#include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef pair pint; typedef vector vint; typedef vector vpint; #define mp make_pair #define fi first #define se second #define all(v) (v).begin(),(v).end() #define rep(i,n) for(int i=0;i<(n);i++) #define reps(i,f,n) for(int i=(f);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; for (int i = 2; i <= max_i; ++i){ if(isprime[i]){ while(n % i == 0){ n /= i; num++; } } } if(num >= 2) printf("YES\n"); else printf("NO\n"); return 0; }