#include #include #include using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); uint32_t i, j; vector is_prime(10'000'001, true); is_prime[0] = is_prime[1] = false; for (i = 2; i <= 10'000'000; ++i) if (is_prime[i] && i <= 10'000) for (j = i * i; j <= 10'000'000; j += i) is_prime[j] = false; uint64_t N; cin >> N; for (i = 2; static_cast(i) * i <= N; ++i) { if (N % i == 0) if (!is_prime[i] || !is_prime[N / i]) { cout << "YES\n"; return 0; } } cout << "NO\n"; return 0; }