#include "bits/stdc++.h" using namespace std; typedef long long Int; #define REP(i,n) for(int (i)=0;(i)<(int)(n);++(i)) const int MAX_N = 10000000 + 10; bool is_prime[MAX_N]; int main() { Int N; cin >> N; if (N == 1) { cout << "NO" << endl; } else { for (int i = 0; i < MAX_N; i++) is_prime[i] = true; is_prime[0] = is_prime[1] = false; for (int i = 2; i * i <= MAX_N; i++) { if (is_prime[i]) { for (int j = i * i; j < MAX_N; j += i) { is_prime[j] = false; } } } int count = 0; Int pp = 1; for (int i = 0; i < MAX_N; i++) if (is_prime[i]) { while (N % i == 0) { count++; pp *= i; N /= i; } } if (count >= 3 || count == 2 && pp != N) { cout << "YES" << endl; } else { cout << "NO" << endl; } } }