#SDNU1649. Palindrome of prime number
Palindrome of prime number
Description
We are all acmers who love palindrome and prime numbers. They are indispensable in this important day.
Now we give a prime number n which satisfies one constraint: It only consists of 1-9, and each number only appears once at most, such as 13, 231, 289.
Please judge whether the palindrome number of this prime number is prime (For example, palindrome number of 13 is 131, palindrome number of 127 is 12721).
Format
Input
The first input line is an integer .
T lines follows, each line has an integer as mentioned above.
Output
For each n, if the palindrome number of n is still a prime, then output "prime", otherwise output "noprime".
Samples
1
13
prime
Hints
The palindrome number of 13 is 131 and 131 is an prime, so you should output "prime".