Possible Pairs
Submissions: 436   Accuracy:

22.53%

  Difficulty: Easy   Marks: 2

Given GCD(a, b) is equal to G and LCM(a, b) is equal to L. The task is to find number of possible pairs (a, b).

Input:
First line consists of T test cases. Only line of test cases consists of 2 integers G and L.

Output:
Single line output, print the count of possible pairs.

Constraints:
1<=T<=100
1<=G,L<=1000

Example:
Input:

2
2 12
3 6
Output:
4
2

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Saksham Raj Seth
Author: saksham seth


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.