Eric has four integers , , , and .
Instantly, he wondered how many pairs of integers, , satisfy the following equation:
where and .
Find and print the number of pairs that satisfy the above equation.
Input Format
The first line contains an integer , the number of queries.
lines follow, each containing four integers, , , , and , in that order.
Constraints
Output Format
For each test case, print one line, the number of pairs that are valid solutions to Eric's equation.
Sample Input 0
1
1 1 1 1
Sample Output 0
1
Explanation 0
The solution to , where and is , .