#include using namespace std; typedef long long ll; bool p[1000001]; vector primes; ll n; void sieve() { for (int i = 2; i <= 1000000; ++i) { if (!p[i]) continue; primes.push_back(i); for (int j = i + i; j <= 1000000; j += i) p[j] = false; } } bool is_prime(ll n) { for (int i = 2; i * i <= n; ++i) if (n % i == 0) return false; return true; } int main() { cin >> n; memset(p, true, sizeof(p)); sieve(); if (n == 1 || is_prime(n)) { cout << "YES" << endl; return 0; } for (int i = 0; i < primes.size() && (ll)primes[i] * primes[i] <= n; ++i) { if (n % primes[i] == 0) { cout << "YES" << endl; return 0; } } cout << "NO" << endl; }