#include using namespace std; using ll = long long; const int INF = 1e9; const int MOD = INF+7; const ll LINF = 1e18; #define rep(i,N) for(int (i)=0;(i)<(N);++(i)) #define rrep(i,N) for(int (i)=(N-1);(i)>0;--i) #define FOR(i,j,N) for(int (i)=(j);(i)<(N);++(i)) #define put(n) cout<<(n)< is_prime(100001000,true); std::vector prime; void SieveofEratosthenes(){ prime.reserve(1000000); is_prime[0] = is_prime[1] = false; for(int i=2;i<=100000000;i+=2) is_prime[i] = false; for(int i=3;i<=100000000;i+=3) is_prime[i] = false; is_prime[2] = is_prime[3] = true; prime.push_back(2); prime.push_back(3); for(int i=5;i<=10000;++i){ if(!is_prime[i]) continue; for(int j = i*2; j<=100000000;j*=2){ is_prime[j] = false; } prime.push_back(i); } } int main(){ SieveofEratosthenes(); int N; cin >> N; for(int i=0;i