def find_two_prime(answer):
for first in range(2, 1000+1):
for second in range(2, 1000+1):
if is_prime(first) and is_prime(second):
if first * second == answer:
return first, second
return 0, 0
first, second = find_two_prime(7387)
print 'The two numbers are %d and %d.' % (first, second)