#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define INF 1e9 #define PI acos(-1) typedef long long ll; bool result[10000] = { false }; bool is_prime(int n) { for (int i = 2; i*i <= n; i++) { if (n%i == 0)return false; } return n != 1; } int main() { int n; cin >> n; vector prime; for (int i = 2; i <= 10000; i++) { if (is_prime(i))prime.push_back(i); } for (int i = 2; i