#include using namespace std; typedef long long ll; signed main(){ ll N; cin >> N; if( N == 1 ) cout << "NO" << endl, exit( 0 ); int ng = 0; for( int i = 2; 1LL * i * i <= N; ++i ) ng |= N % i == 0; if( ng ) cout << "NO" << endl; else cout << "YES" << endl; return 0; }