#include #include #include using namespace std; typedef long long ll; vector getprimelst(int n) { vector isprime(sqrt(n) + 1, true); isprime[0] = isprime[1] = false; for (ll i = 2; i * i <= n; ++i) { if (!isprime[i]) continue; for (ll j = i * 2; j * j <= n; j += i) { isprime[j] = false; } } vector primelst; for (ll i = 2; i * i <= n; ++i) { if (isprime[i]) { while (!(n % i)) { primelst.push_back(i); n /= i; } } } if (n != 1) primelst.push_back(n); return primelst; } int main() { ll N; cin >> N; vector primelst = getprimelst(N); if (primelst.size() > 2) { cout << "YES" << endl; } else { cout << "NO" << endl; } }