Package for this problem was not updated by the problem writer or Codeforces administration after we’ve upgraded the judging servers. To adjust the time limit constraint, solution execution time will be multiplied by 2. For example, if your solution works for 400 ms on judging servers, then value 800 ms will be displayed and used to determine the verdict.

The following languages are only available languages for the problems from the contest

VK Cup 2012 Wild-card Round 1:

- Factor

Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

The problem statement has recently been changed. View the changes.

×
I. Truncatable primes

time limit per test

3 secondsmemory limit per test

256 megabytesinput

standard inputoutput

standard outputA truncatable prime is a prime number which contains no zeros in decimal notation and all its suffixes are primes. 1 is considered to be not a prime.

You are given a positive integer *n*. Figure out whether it is a truncatable prime.

Input

The only line of input contains an integer *n* (2 ≤ *n* ≤ 10^{7}).

Output

Output "YES" if *n* is a truncatable prime. Output "NO" otherwise. Quotes for clarity only.

Examples

Input

19

Output

NO

Input

9137

Output

YES

Note

In the first sample 19 is a prime but its suffix 9 is not.

In the second sample 9137, 137, 37 and 7 are all primes, so 9137 is a truncatable prime.

Codeforces (c) Copyright 2010-2020 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Oct/01/2020 05:24:44 (i2).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|