#include #include using namespace std; #define rep(i,n) for(int i=0;i<(n);i++) const int max_i = 1e7 + 10; bool isprime[max_i];//素数を入れる //エラトテネス void eratos(int m){ for (int i = 0; i <= m; ++i) isprime[i] = true; isprime[0] = isprime[1] = false; //iを残してiの倍数を消していく for (int i = 2; i <= m; ++i){ if(isprime[i]){ for (int j = 2 * i; j <= m; j += i){ isprime[j] = false; } } } return; } int main(void){ long long n; cin >> n; eratos(max_i); int num = 0; long long d = 1; for (int i = 2; i <= max_i; ++i){ if(isprime[i]){ while(n % i == 0){ n /= i; num++; d *= i; // printf("%d\n", i); } } } if(num >= 3) printf("YES\n"); else if(num == 2 && n != d) printf("YES\n"); else printf("NO\n"); return 0; }