At last, an interesting and difficult problem!

Here, we say that a natural nn is primeful if it is possible to obtain a prime number by deleting some (possibly none) digits from nn.

For example, 6814 is primeful because deleting 8 and 4 results in 61, which is prime.

Given several nn, can you determine whether they are primeful or not?

Input

Input consists of several nn, all between 1 and 10105110^{10^5} - 1.

Output

For every given nn, tell if it is primeful or not.

Problem information

Author: Félix Moreno

Generation: 2026-01-25T11:38:44.190Z

© Jutge.org, 2006–2026.
https://jutge.org