H. Has a Unilestep ever existed?
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Nikolas was intrigued by the name of Unioeste: State University of Western Paraná. According to his reasoning, why specify that the university is in the "West" (oeste in Portuguese) of Paraná, if there is no State University of "Eastern" (leste in Portuguese) Paraná? To correct this geographical injustice, he decided to found Unilestep (State University of Eastern Paraná).

However, the master plan for cities in the east includes some rules that must be followed:

  • The land cannot have a zero area.
  • The land must be a square with sides of integer measurements.
  • The area of the land, in square meters, must be a number that has between $$$L$$$ and $$$R$$$ digits, inclusive.

For example, for $$$L = 2$$$ and $$$R = 5$$$:

  • A square plot with an area equal to $$$64\;\text{m}^2$$$ can be used, as its area has two digits and its sides are integers.
  • A square plot of land with an area equal to $$$500\;\text{m}^2$$$ cannot be used, because although its area has the correct number of digits, the size of its sides is not an integer.
  • A square plot of land with an area equal to $$$1\;\text{m}^2$$$ cannot be used, because its area has only 1 digit, which is outside the range $$$[2, 5]$$$.

To help Nikolas choose the ideal plot of land to build Unilestep, write a program that, given the values of $$$L$$$ and $$$R$$$, reports how many distinct plots of land he can use. A plot of land is considered distinct from another only if its area is different.

Input

The first line of the input contains the integer $$$T$$$ $$$(1 \leq T \leq 10^{3})$$$, the number of test cases. This is followed by $$$T$$$ lines, each line being a test case containing two integers $$$L$$$ and $$$R$$$ ($$$1 \leq L \leq R \leq 17$$$).

Output

For each test case, your program should output a line containing an integer: the number of different plots of land that Nikolas can use, given the values of $$$L$$$ and $$$R$$$ provided.

Examples
Input
1
2 3
Output
28
Input
2
9 12
10 17
Output
990000
316196144