#include #include #include #include #include #include #include #include #include #include #include #include #include using ll = long long; using namespace std; const ll MOD = 1e9 + 7; #define REP(i, n) for (int(i) = 0; (i) < (n); ++(i)) #define repi(i, a, b) for (int i = int(a); i < int(b); ++i) // bool operator<(const pair &a, const pair &b) // { // if (a.first == b.first) // return a.second < b.second; // return a.first < b.first; // }; /*unsigned int xor128(void) { static unsigned int x = 123456789, y = 362436069, z = 521288629, w = 88675123; unsigned int t = (x ^ (x << 11)); x = y; y = z; z = w; return (w = (w ^ (w >> 19)) ^ (t ^ (t >> 8))); } unsigned int xor128rnd(unsigned int m) { return xor128() % m; }*/ bool sieve[10000010]; int main(void) { ll N; cin >> N; if (N == 1) { cout << "NO" << endl; return 0; } REP(i, 10000010) { sieve[i] = true; } sieve[0] = sieve[1] = false; for (int i = 2; i * i < 10000010; ++i) { if (sieve[i]) { for (int j = 2; i * j < 10000010; ++j) { sieve[i * j] = false; } } } int divp = 0; for (ll i = 2; i * i <= N; ++i) { if (N % i == 0) { if (sieve[i]) divp++; else { cout << "YES" << endl; return 0; } } if (divp == 2) { cout << "YES" << endl; return 0; } } cout << "NO" << endl; return 0; }