#include #define rep(i,n) for(int i = 0; i < (n); i++) using namespace std; typedef long long ll; int main(){ cin.tie(0); ios::sync_with_stdio(0); ll N; cin >> N; ll cnt = 0; ll p = -1; for(ll i = 2; i * i <= N; i++) { while(N % i == 0) { cnt++, N /= i; if(p == -1) p = i; else if(p != i) { cout << "YES" << endl; return 0; } } if(cnt >= 3){ cout << "YES" << endl; return 0; } } cout << "NO" << endl; return 0; }