#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; const constexpr int INF = 1e9; #define FOR(i, a, n) for (ll i = (ll)a; i<(ll)n; ++i) #define REP(i, n) FOR(i, 0, n) typedef long long ll; typedef vector VI; typedef pair P; struct Less{ bool operator()(const pair&a, const pair&b){ if(a.first==b.first){ return a.second < b.second; } return a.first < b.first; } }; const constexpr ll MOD = 1e9 + 7; ll extGCD(ll a, ll b, ll& x, ll& y){ if(b==0){ x=1; y=0; return a; } ll d = extGCD(b, a%b, y, x); y -= a/b*x; return d; } ll GCD(ll a, ll b){ if(b==0) return a; return GCD(b, a%b); } bool sieve[10000010]; int main() { for(int i=0; i<10000010; ++i) 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; } } ll N; cin >> N; bool ok = true; for(ll i=2; i*i<=N; ++i){ if(N%i==0) ok = false; } if(ok) cout << "NO" << endl; else cout << "YES" << endl; return 0; }