#C9921. Prime Palindromic Numbers

    ID: 54068 Type: Default 1000ms 256MiB

Prime Palindromic Numbers

Prime Palindromic Numbers

Given two integers (a) and (b) where (a \le b), your task is to find all numbers in the interval ([a, b]) that are both prime and palindromic. A palindromic number is a number that remains the same when its digits are reversed. If there are no such numbers in the given range, output the string "No prime palindromic numbers found."

For example, if the input is 5 100, then the prime palindromic numbers are 5, 7, and 11.

inputFormat

The input consists of a single line with two space-separated integers (a) and (b) ((1 \leq a \leq b)).

outputFormat

Output a single line. If there exists at least one prime palindromic number in the interval ([a, b]), then print these numbers separated by a space in increasing order. Otherwise, print the exact message: "No prime palindromic numbers found."## sample

5 100
5 7 11