#include <stdio.h> #include<math.h> int main(void) { int n1; long long ans, n; scanf("%lld", &n); ans = n; while(n/10 != 0) { n = n / 10; if(n / 10 == 0) ans = ans * 10 + n; else { n1 = n % 10; ans = ans * 10 + n1; } } int flag = 1; int temp = sqrt(ans); for(long long i = 2; i <= temp; i++) { if(ans % i == 0) { flag = 0; break; } } if(flag == 0) printf("noprime"); else printf("prime"); system("pause"); return 0; }