#t59. 含有 7 的素数

含有 7 的素数

Primes Containing the Digit 7

Problem Description

Little J learned about prime numbers yesterday and found them great fun. He wants to find some special primes. Since his lucky number is 77, he wants to know which primes in a given range have a 77 in any digit. Tell him!

Input Format

Two integers m,nm, n (0≤m≤n≤1070 \le m \le n \le 10^7).

Output Format

Output, in ascending order, all primes in the interval [m, n] that contain the digit 77 in any position.

If no prime in this interval satisfies the requirement, output none.

Sample Input 1

1 20

Sample Output 1

7 17

Sample Input 2

20 30

Sample Output 2

none