#include <iostream>
#include <fstream>
#include <iomanip>
#include <cmath>
using namespace std;
int main()
{
	int N;
	ifstream fi("snton.inp");
	fi>>N;
	fi.close();
	ofstream fo("snton.out");
    int x=0;
	if((N==0)||(N==1))cout<<"NO";
	else{for(int i=0;i*i<=N;i++)
	{if(N%i==0){x++;cout<<"NO";break;};
	}
	if(x==0)cout<<"YES";
	}
	fo.close();
	return 0;
}
