#include using namespace std; typedef long long ll; bool p[10000001]; ll n; void sieve() { for (int i = 2; i <= 10000000; ++i) { if (!p[i]) continue; for (int j = i + i; j <= 10000000; j += i) p[j] = false; } } bool is_prime(ll n) { for (ll 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 << "NO" << endl; return 0; } for (ll i = 2; i * i <= n; ++i) if (n % i == 0 && (!p[i] || !is_prime(n/i))) { cout << "YES" << endl; return 0; } cout << "NO" << endl; }