import math

def prime(x) : 
	for i in range(2, int(x ** 0.5) + 1) : 
		if (x % i == 0) : 
			return False
	return True


L = []
E = []
for i in range(2, 150) : 
	if prime(i) : 
		L.append(i)
		E.append(math.log(i))
		if (len(L) == 30) :
			break
print L

vis = {}
vis[23] = 3363284
vis[24] = 2048443
vis[25] = 26968428
vis[26] = 24488513
vis[27] = 98733728
vis[28] = 144534809
vis[29] = 306037876
vis[30] = 857511142

for n in range(23, 31) : 
	delta = 1
	for i in range(n) : 
		if ((vis[n] >> i) & 1) == 1 : 
			delta *= L[i]
	print n, delta

exit()

for n in range(1, 20) : 
	tot = 0
	for i in range(n) :
		tot += E[i]

	ans = tot
	pos = 0
	mask = 0
	for i in range(0, 1 << n) : 
		a = 0
		b = 0
		for j in range(n) : 
			if ((i >> j) & 1) == 1 :
				a += E[j]
			else : 
				b += E[j]
		if (a < b and b - a < ans) :
			mask = i
			ans = b - a
	delta = 1
	print n, mask
#	
#	for i in range(n) : 
#		if ((mask >> i) & 1) == 1 : 
#			delta *= L[i]
#	print n, delta

#27 98733728
#28 144534809
#29 306037876
#30 857511142




