MYSTERIO - Mysterious Number

Mysterious Number refers to a number which can be divisible by the number of distinct factors that it has. For instance, 1 (1 factor), 12 (6 factors) and 9 (3 factors) are Mysterious Numbers, but 7 (2 factors) or 16 (5 factors) are not.

Given two integers low and high, please calculate the number of Mysterious Numbers between low and high, inclusive.

Input

For each test case, there are two integers low and high in one line separated by spaces. 1 ≤ lowhigh ≤ 1,000,000

Output

Print out the number of Mysterious Numbers between low and high, inclusive.

Example

Input:
1 10
10 15

Output:
4
1

Added by:[UNI]Jonathans
Date:2013-03-14
Time limit:1.010s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:C CSHARP C++ 4.3.2 CPP C99 JAVA
Resource:TJU Team Selection Contest 2009 (4)

hide comments
2013-03-30 10:59:38 bekti galan prasetyo
any annoying testcase?
2013-03-30 06:54:16 Muh. Aunorafiq Musa
when the program will stop if there is no input for test case?
2013-03-14 02:18:34 [Trichromatic] XilinX
Constraints too small. An O(n) sieve solution can easily pass. Problem moved to tutorial.
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.