#include<stdio.h>
int pd(int );
int main()
{
int m;
while(scanf("%d",&m)==1)
{
if(pd(m))
printf("yes\n");
else
printf("no\n");
}
return 0;
}
int pd(int n)
{
if(n>=2)
if(n%2==0||n%3==0||n%5==0||n%7==0)
return 0;
else return 1;
else return 1;
}
经运算,2,3,5,7是后面一切数字的因数,只要能判断是否整除其中一个便能判断其不是素数,全部不整除则说明其是素数