#include <stdio.h> #include <math.h> int main(void) { int i, m; scanf("%d",&m); for(i=2;i<=sqrt(m);i++) if(m%i==0) break; m%i==0? printf("%d is a prime number!\n",m):printf("%d is not a prime number!\n",m); }