(QUESTION)-:PRB01 Problem - CodeChef
#include
using namespace std;
int main()
{
// your code goes here
int T,flag=0;
int n;
cin>>T;
for(int i=1;i<=T;i++)
{
cin>>n;
for(int j=2;j<n/2;j++)
{
flag=0;
if(n%j==0)
{
cout<<"NO"<<endl;
flag=1;
break;
}
}
if(flag==0)
cout<<"YES"<<endl;
}
return 0;
}