Pure Prime Numbers


Submit solution

Points: 100
Time limit: 1.0s
Memory limit: 256M

Author:
Problem types

Count integers in \([a,b]\) that are prime, contain only prime digits, and have a prime digit sum.

Input

One line containing \(a\) and \(b\).

The input satisfies:

  • \(1 \le a \le b \le 10^7\)

Output

Print the required count.

Example

Input
1 10
Output
4

Comments

There are no comments at the moment.