#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,i=2,ques;
int count;
cin>>ques;
for(int j=0;j<ques;j++)
{
cin>>n;
count=2;
for(i=2;i<n-1;i++)
{
if(n%i==0)
{
count++;
}
}
if(count==3)
{
cout<<“YES”<<endl;
}
else
{
cout<<“NO”<<endl;
}
}
}
sir please help me to run this efficiently as i am getting timelimit error in hacker block . A s i had solved this after watching prime number basic video, which was present in fundamentals 2