Logo HelloWorld信息学奥赛题库

少儿编程

时间限制:1 s 空间限制:256 MB

#13019. Prime Palindromes

Statistics

题目描述

The number 151 is a prime palindrome because it is both a prime number and a palindrome (it is the same number when read forward as backward). Write a program that finds all prime palindromes in the range of two supplied numbers a and b (5 <= a < b <= 100,000,000); both a and b are considered to be within the range .

输入格式

Line 1:    Two integers, a and b

输出格式

The list of palindromic primes in numerical order, one per line.

样例数据

input

5 500

output

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