#include<bits/stdc++.h>
using namespace std;
bool is_Prime(int x){
if(x==0||x==1) return false;
for(int i=2;i*i<=x;i++){ //i<x也行但程序运行速度慢 ,记住简化条件:i*i<=x
if(x%i==0){
return false;
}
}
return true;
}
int main(){
int t,n;
cin>>t;
for(int i=1;i<=t;i++){
cin>>n;
if(is_Prime(n)==true){
cout<<"Yes"<<endl;
}else{
cout<<"No"<<endl;
}
}
return 0;
}

京公网安备 11010502036488号