Problem: Alice has just learnt multiplying two integers. He wants to multiply two integers X and Y to form a number Z. To make the problem interesting he will choose X in the range [1,M] and Y in the range [1,N]. Help him to find the number of ways in which he can do this.

Input
First line of the input is the number of test cases T. It is followed by T lines. Each line has three space separated integers, the numbers Z, M and N.

Output 
For each test case output a single integer, the number of ways.

Constraints
1 ≤ T ≤ 50 
1 ≤ Z ≤ 10^12
1 ≤ M ≤ 10^12
1 ≤ N ≤ 10^12

SAMPLE INPUT
4
4 7 9
5 2 10
5 5 6
2 8 1

SAMPLE OUTPUT
3
1
2
1

Solution (in PYTHON):

Solution:
import sys
import math

def countpairs(factors, z, m, n, x):
    if len(factors) == 0:
        if (z/x <= n):
            #print(x, z/x)
            return 1
        else:
            return 0
    factor, count = factors.pop()

    num = 0
    for i in range(count + 1):
        if x <= m:
            #print('countpairs', factors, z, m, n, x)
            num += countpairs(factors, z, m, n, x)
        else:
            break
        x = x * factor

    factors.append((factor, count))
    return num

n = int(sys.stdin.readline())
for _ in range(n):
    z, m, n = [int(x) for x in sys.stdin.readline().split()]

    res = 0

    lim = min(int(math.sqrt(z)), max(m, n))
    z1 = z 
    factors = []
    i = 2
    while(i <= lim and z > 1):
        count = 0
        while z % i == 0:
            count += 1
            z = int(z/i)
        if count:
            factors.append((i, count))
        if i == 2:
              i += 1
        else:
              i += 2
    if z > 1:
        factors.append((z, 1))
    #print(factors)
    #print('countpairs', factors, z1, m, n, 1)
    res += countpairs(factors, z1, m, n, 1)
    print(res)