from isPrime import *
max=-1
product=0
for a in range(-999,1000):
for b in range(-999,1000):
n=0
while(n*n+a*n+b>2 and isPrime(n*n+a*n+b)==True):
n+=1
if n>max:
max=n
product=a*b
print(product)
max=-1
product=0
for a in range(-999,1000):
for b in range(-999,1000):
n=0
while(n*n+a*n+b>2 and isPrime(n*n+a*n+b)==True):
n+=1
if n>max:
max=n
product=a*b
print(product)