Problem1279--素数回文

1279: 素数回文

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MB

Description

小王对既是素数又是回文的数特别感兴趣。比如说151既是素数又是个回文。现在小王想要你帮助他找出某个范围内的素数回文数,请你写个程序找出 a 跟b 之间满足条件的数。(5 <= a < b <= 100,000,000);

Input

输入a和b(5 <= a < b <= 100,000,000)

Output

按从小到大输出a,b之间所有满足条件的素数回文数

Sample Input Copy

5 500

Sample Output Copy

5
7
11
101
131
151
181
191
313
353
373
383

Source/Category