#include<fstream>
#include<iostream>
#include<math.h>
using namespace std;
int main()
{
	int n,c=0;
	ifstream f1; f1.open("snton.inp");
	f1>>n;
	f1.close();
    ofstream f2; f2.open("snton.out");
    if(n==1){f2<<"NO";}
    if((n>1)&&(n<4)){f2<<"YES";}
    f2.close();
    if(n>=4)
        {for(int b=2;b<=sqrt(n);b++)

        if(n%b==0) {c=1;break;}

    ofstream f2; f2.open("snton.out");
    if (c==0)
    {f2<<"YES";}
    if (c==1)
    {f2<<"NO";}
    f2.close();}
}
