Nik is bored of functions now and started looking for equations in Maths. Recently he saw an equation in two variables which was following:-
A * B = x + y * (gcd(A,B) + z * (lcm(A,B))
x,y and z were given to Nik and he had to find number of pairs (A,B) which will satisfy the given equation. gcd in the equation represents greatest common divisor and lcm stands for least common multiple of A and B. Nik was thinking of solution to the problem and Alex called him up. As he is now busy with Alex, you have to solve the question for him.
For the first test case there are two pairs (2,4) and (4,2).