#include #include int main(void){ int a = 0; long long i, N; scanf("%lld", &N); long long x = (long long)sqrt((double)N); if(N<=7){ printf("NO\n"); }else{ if(N%2==0){ N = N/2; a++; } if(N%2==0){ N = N/2; a++; } if(N%2==0){ N = N/2; a++; } for(i=3;i<=x;i+=2){ if(N%i==0){ N = N/i; a++; i=3; } if(a>=3) break; } if(a!=1) a++; if(a>=3){ printf("YES\n"); }else{ printf("NO\n"); } } return 0; }