mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
21 lines
289 B
C
21 lines
289 B
C
#include <stdio.h>
|
|
#include <math.h>
|
|
int main()
|
|
{
|
|
int m,i,k,pc;
|
|
scanf("%d",&pc);
|
|
for(;pc>0;pc--)
|
|
{
|
|
scanf("%d",&m);
|
|
k=(int)sqrt(m);
|
|
for(i=2;i<=k;i++)
|
|
if(m%i==0)
|
|
break;
|
|
if(i>k)
|
|
printf("Yes\n");
|
|
else
|
|
printf("No\n");
|
|
}
|
|
return 0;
|
|
}
|