Right-truncatable Primes


Submit solution

Points: 100
Time limit: 1.0s
Memory limit: 256M

Author:
Problem types

A prime is right-truncatable if deleting its last digit repeatedly always leaves a prime. List all such primes not greater than \(N\).

Input

One line containing \(N\).

The input satisfies:

  • \(2 \le N \le 30000\)

Output

Print the numbers in increasing order, separated by single spaces.

Example

Input
2
Output
2

Comments

There are no comments at the moment.