import java.util.Scanner;
public class ss {
public static void main(String args[]) {
System.out.println("请输入一个数字:");
Scanner sc = new Scanner(System.in);
int num = sc.nextInt();
if (isPrimes(num)) {
System.out.println("1(是素数)");
}
else {
System.out.println("0(不是素数)");
}
}
public static boolean isPrimes(long a) {
for (int i = 2; i <= Math.sqrt(a); i++) {
if (a % i == 0) {
return false;
}
}
return true;
}
}