"Mirror prime" numbers#22

"Mirror prime" numbers

1 second
128 megabytes
Easy

We call a number a "mirror prime" if it is prime, and the number obtained by reversing its digits is also prime.

Find the number of "mirror primes" in the interval from to , inclusive.

Input

Two integers and (1 \le a \le b \le 10000).

Output

Print the number of "mirror primes" in the interval from to , inclusive.

Examples

Example 1

Loading
Loading