#include
#include
bool check(int);
int main(void)
{
int num;
while (scanf("%d", &num) == 0 || num < 0)
{
printf("输入错误,请输入正整数\n");
rewind(stdin);
}
if (check(num))
printf("%d是素数\n", num);
else
printf("%d不是素数\n", num);
return 0;
}
bool check(int number)
{
int i;
for (i = 2; i < number; i++)
if (number % i == 0)
return false;
return true;
}