9057 - Prime Palindrome   

Description

The number 151 is a prime palindrome because it’s a prime number and a palindrome. (A palindrome means it’s the same number when read backward.) Write a program to find all prime palindromes in the range of two supplied numbers a and b. Both a and b are considered to be within the range.     

Input

The input includes multiple test cases. In each test case, the one line contains two integers a and b.

5 <= a <= b <=108

Output

 One line contains all prime palindromes in numerical order. If it doesn't exist any prime palindrome, please output "Impossible".

Sample Input  Download

Sample Output  Download

Tags




Discuss