#include<iostream> using namespace std;
main() { int N; cin>>N; if (prost(N)) cout<<"YES"; else cout<<"NO"; }