#include <stdio.h>
int main() {
    unsigned long long n = 0;
    scanf("%llu", &n);
    unsigned long long a = n;
    while (a) {
        a /= 10;
        n = n * 10 + a % 10;
    }
    n = n / 10;
    unsigned long long m = n;
    int b = 0;
    for (unsigned long long j = 2; j * j < n; j++) {
        if (m % j == 0) {
            b = 1;
            break;
        }
    }
    if (b == 0)printf("prime");
    else printf("noprime");
    return 0;
}