#include #include #include using namespace std; vector enumPrimes (int begin, int end) { vector res; if (end <= 1) return res; vector isPrime(end+1, true); isPrime[0] = isPrime[1] = false; for (int i = 0; i <= end; i++) { if (!isPrime[i]) continue; int j = i; while (1LL*i*j <= end) { isPrime[i*j] = false; j++; } } for (int i = begin; i <= end; i++) if (isPrime[i]) res.push_back(i); return res; } int main () { vector prime = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101}; reverse(prime.begin(), prime.end()); vector ans(25); for (int i = 0; i < ans.size(); i++) ans[i] = prime[i]*prime[i+1]; auto primes = enumPrimes(103, 100000); int cur = 0; for (int i = 1; i < ans.size(); i++) { while (true) { if (ans[i-1] < primes[cur] * ans[i]) { ans[i] *= primes[cur]; break; } cur++; } } int N; cin >> N; for (int i = 0; i < N; i++) { cout << ans[i] << (i==N-1 ? '\n' : ' '); } return 0; }