import java.util.Scanner;
class abc{
public static void main(String args[]){
Scanner n = new Scanner(System.in);
int x = 0;
while(x != -1){
System.out.print("Input:");
x = n.nextInt();
if(isPrime(x)){
System.out.println(x+"是质数");
}else{
System.out.println(x+"不是质数");
}
}
}
public static boolean isPrime(int x){
for(int i = 2; i<= Math.sqrt(x);i++){
if( x % i == 0 ){
return false;
}
}
return true;
}
}