#1058 import numpy as np import itertools def create_prime_list(limit): x = limit**0.5 primes = [] #print('x={0}'.format(x)) nums = [x for x in range(2, limit+1)] while nums[0]<=x: primes.append(nums[0]) current_prime = nums[0] nums = [x for x in nums if x%current_prime != 0] primes.extend(nums) return primes N = int(input()) ans = [1] s = np.array(create_prime_list(10**5+5*10**4)) s = s[s>10**5][:10] #print(s) for i,j in itertools.combinations(s, 2): ans.append(i*j) for i in s: ans.append(i**2) ans.sort() print(ans) print(ans[N-1])