Prime Suffixes

아직 제출이 없습니다시간 제한1초메모리 제한512 MB

문제

Let us call a number yy a suffix of a number xx, if we can remove digits from the beginning of a decimal representation of xx to get yy. Note that if there are no zeroes in a decimal representation of xx, all suffixes of xx contain no leading zeroes. For example, suffixes of 283283 are 283283, 8383 and 33.

An integer is called prime, if its has exactly two positive integer divisors. The number 11 is not prime --- it has only one positive integer divisor.

Senya likes prime numbers that have no zeroes in their decimal representation, such that all of their suffixes are also prime.

You are given integers aa and bb. Help Senya to find out, how many integers between aa and bb are there that he likes.

입력

Input contains two integers aa and bb (1ab10111 \le a \le b \le 10^{11}).

출력

Print the number of primes between aa and bb inclusive, such that they have no zeroes in their decimal representation, and if any number of their leading digits are removed, the resulting number is still prime.

힌트

In the first example Senya likes integers 55, 77 and 1313.

In the second example all integers in the range contain 00 in their decimal respresentation.

In the third example Senya likes integer 283283, since 283283, 8383 and 33 are all prime.