```cpp
include[HTML_REMOVED]
include[HTML_REMOVED]
using namespace std;
int main(){
int n,i,x,j,sum;
cin>>n;
for(i=1;i<=n;i)
{
cin>>x;
sum=0;
for(j=2;j*j<=x;j)//质数检查到不大于平方根
{
if(x%j==0){
sum=1;
break;
}
}
if(sum==0){
cout<<x<<" is prime"<<endl;}
else{
cout<<x<<" is not prime"<<endl;}
}
return 0;
}