Corner cases missing

i have written the code and i think it is well optimised but i m getting 2 test cases wrong can u please tell what am i missing
#include
#include<math.h>
using namespace std;
#define ll long long
int main() {
ll int n;
cin>>n;
while(n–){
ll int x;
cin>>x;
ll int count=pow(x,(float)1/2);
bool check=true;
for(int i=2;ii<=count;i=i+1){
if(x%i==0){
check=false;
break;
}
}
if((count
count)==x && check==true){
cout<<“YES\n”;
}
else
cout<<“NO\n”;
}
}

please share code using ide link.

sir please respond to the question

because for 1 your code’s output is YES. Just add a condtion x==1 cout<<NO.

and sory for delay i was in train last night :smiley:

thanks a lot sir for ur help