#include using namespace std; #define MAX 10000010 bool prime[MAX]; typedef unsigned long long ull; void sieve() { fill(prime, prime+MAX, true); prime[0] = prime[1] = false; for(ull i=2 ; i*i> N; if(N == 1) { cout << "NO\n"; return 0; } int cnt = 0; ull K = N; for(ull i=2; i*i<=K; i++) { if(prime[i]) { while(N % i == 0) { N /= i; cnt ++; } } } if(N > 1) { cnt ++; } if(cnt > 2) cout << "YES\n"; else cout << "NO\n"; return 0; }