#include #include #include #include #include #include #include #include #include #include #define ALL(obj) (obj).begin(),(obj).end() #define RALL(obj) (obj).rbegin(),(obj).rend() #define P pair #define MOD 1000000007 #define INF 1012345678 #define NINF (-2147483647-1) #define LLINF 9223372036854775807 using ll = long long; using namespace std; int main() { ll N,A; cin >> N; A = 10000000; int cnt = 0; // エラトステネスの篩 vector isprime(A + 1, true); vector prime; for (int i = 2; i*i <= A; i++) { if (isprime[i]) { for (int j = i + i; j <= A; j += i) { isprime[j] = false; } } } for (int i = 2; i < A; i++) { if (isprime[i]) { prime.push_back(i); } } for (int i = 0; i < prime.size(); i++) { while (N % prime[i] == 0) { cnt++; N /= prime[i]; } } if (cnt >= 3) { cout << "YES" << endl; } else { cout << "NO" << endl; } getchar(); getchar(); return 0; }