In this problem, we will say that a pair of integer numbers is cool if , and both and are perfect squares or perfect cubes. For instance, is a cool pair, because is a perfect cube () and is a perfect square (). As another example, is a cool pair as well (a bit special, since 0 and 1 are perfect squares and also perfect cubes).
Given an interval , how many cool pairs does it contain?
Input consists of several cases, each one with and . Assume .
For every case, print the number of cool pairs with and inside .
Input
0 8 0 9 1 15 999999999999999999 1000000000000000000
Output
1 2 1 0