#include #include #include #include #include #include #include using namespace std; /* 184 //名前が 184 no36 */ int p[10000001]={0,0,1,1,0,1}; int main(){ long long n;scanf("%lld",&n); if(n==2){ printf("NO\n");return 0; } for(int i=3;i*i<=n;i+=2)p[i]=1; for(int i=3;i*i<=n;i+=2)if(p[i])for(int j=i+i;j<=n;j+=i)p[j]=0; for(int i=3;i*i<=n;i+=2){ if(n%p[i]==0&&n!=i){ printf("YES\n");return 0; } } printf("NO\n"); return 0; }