import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); // 构造回文数 String str = "" + n; StringBuilder sb = new StringBuilder(); sb.append(str.substring(0, str.length()-1)); String num = "" + n + sb.reverse().toString(); long res = Long.parseLong(num); // 判断回文数是否是素数 for (long i=2; i*i <= res; i++) { if (res % i == 0) { System.out.println("noprime"); return; } } System.out.println("prime"); } }