import java.util.Scanner;
public class test3 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("输入一个整数:");
int number = sc.nextInt();
if (number == 1 || number == 2) System.out.println(number + "是质数");
for (int i = 2; i < number; i++) {
if (number % i == 0) {
System.out.println(number + "不是质数");
break;
} else {
System.out.println(number + "是质数");
break;
}
}
}
}