ret = []
res = []
def combine(list_digits,num,index):
length = len(list_digits)
if num == length:
return ret.append(list_digits[:])
for i in range(index,length):
res.append(list_digits[i])
if num - 1 == 0:
ret.append(res[:])
#print res
res.pop(len(res)-1)
else:
combine(list_digits,num-1,i+1)
res.pop(len(res)-1)
#list_digits = [1,2,3,4]
#combine(list_digits,2,0)
#print ret
import tools
max = 1000000
list_primes = tools.gen_list_primes(max)
#print list_primes
set_primes = tools.gen_set_primes(max)
#print list_primes.index(56003)
length = len(list_primes)
#len_except_last = length - 1