class Test {
public static void main(String[] arges) throws Exception {
while (true){
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
boolean flag =true;
for (int i = 2; i<a-1;i++){
if (a%i==0){
flag = false;
continue;
}
}
if (flag){
System.out.println("该数字是质数");
}else {
System.out.println("该数字不是质数");}
}
}
}