online_judge_1047
#include<stdio.h> #include<math.h> int main() { int n,m,i; while(scanf("%d",&n)!=EOF) { m=(int)sqrt((float)n); if(n<=1) { printf("no\n"); continue; } for(i=2;i<=m;i++) if(n%i==0) { printf("no\n"); break; } if(i>m) printf("yes\n"); } return 0; }