from selectPrime import *
from isPrime import *
prime=[1]*1000005
f=[]
selectPrime(1000000,prime,f)
sum=[0]*100000
sum[1]=f[0]
for i in range(len(f)):
sum[i+1]=sum[i]+f[i]
count=[-1]*1000005
print(len(f))
for i in range(1,len(f)+1):
print(i)
for j in range(i,len(f)+1):
x=sum[j]-sum[i-1]
if x>=1000000:
break
if prime[x]==1:
if j-i>count[x]:
count[x]=j-i
max=-1
l=-1;
for i in range(1,1000005):
if count[i]>max:
max=count[i]
l=i
print(max,' ',l)
from isPrime import *
prime=[1]*1000005
f=[]
selectPrime(1000000,prime,f)
sum=[0]*100000
sum[1]=f[0]
for i in range(len(f)):
sum[i+1]=sum[i]+f[i]
count=[-1]*1000005
print(len(f))
for i in range(1,len(f)+1):
print(i)
for j in range(i,len(f)+1):
x=sum[j]-sum[i-1]
if x>=1000000:
break
if prime[x]==1:
if j-i>count[x]:
count[x]=j-i
max=-1
l=-1;
for i in range(1,1000005):
if count[i]>max:
max=count[i]
l=i
print(max,' ',l)