int isPrime(unsigned long n) {
if (n <= 3) {
return n > 1;
} else if (n % 2 == 0 || n % 3 == 0) {
return 0;
} else {
for (unsigned short i = 5; i * i <= n; i += 6) {
if (n % i == 0 || n % (i + 2) == 0) {
return 0;
}
}
return 1;
}
}
int main()
{
int n;
while(~scanf("%d",&n))
if(isPrime(n))printf("%d是素数\n", n);
else printf("%d不是素数\n", n);
}