Prime Numbers with Prime Digits


Submit solution

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

Author:
Problem types

Count primes in the inclusive range \([a,b]\) whose every decimal digit is one of \(2,3,5,7\).

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
4230440 5004838
Output
0

Comments

There are no comments at the moment.