素数回文

#include <bits/stdc++.h>

using namespace std;

typedef long long LL;

string s;

bool isprime(LL n)
{    
    for(LL i = 2; i <= n / i; i ++)
        if(n % i == 0)
            return false;
    return true;
}

int main()
{
    cin >> s;
    //生成该数的回文数
    for(int i = s.size() - 2; i >= 0; i --)
        s += s[i];
    
    LL t = stoll(s);//string 转 long long
    if(isprime(t)) cout << "prime";
    else cout << "noprime";
    
    return 0;
}