Given two non-negative integers A, B. Find number of pairs of integers (a,b) such that:
The first line of the test case contains an integer T denoting number of test cases. Each line of the test case contains two space separated integer A and B.
For each of the test case print the answer in separate line.
Only (1,2) and (2,1) are such pairs.
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.