Upside down primes#7716

Upside down primes

2 seconds
128 megabytes
Easy

Last night, I must have dropped my alarm clock. When the alarm went off in the morning, it showed 51:80 instead of 08:15. This made me realize that if you rotate a seven segment display like it is used in digital clocks by degrees, some numbers still are numbers after turning them upside down.

prb7716.gif

Prime number on a seven segment display (see third sample).

prb7716_1.gif

turned upside down (i.e. rotated by degrees) gives , which is not prime.

As you can see,

prb7716_2.gif

My favourite numbers are primes, of course. Your job is to check whether a number is a prime and still a prime when turned upside down.

Input

One line with the integer in question (1 \leq n \leq 10^{16}). will not have leading zeros.

Output

Print one line of output containing "yes" if the number is a prime and still a prime if turned upside down, "no" otherwise.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading

Example 3

Loading
Loading