Problem
Chef prepared two dishes yesterday. Chef had assigned the and to the first and to the second dish respectively. The tastiness of the dishes can be any between and (both inclusive).
Unfortunately, Chef has forgotten the values of and that he had assigned to the dishes. However, he remembers the sum of the tastiness of both the dishes - denoted by .
Chef wonders, what can be the maximum possible absolute difference between the tastiness of the two dishes. Can you help the Chef in finding the maximum absolute difference?
It is guaranteed that at least one pair exist such that .
Input Format
- The first line of input contains a single integer , denoting the number of testcases. The description of the testcases follows.
- The first and only line of each test case contains two space-separated integers , , denoting the maximum tastiness and the sum of tastiness of the two dishes, respectively.
Output Format
For each testcase, output a single line containing the maximum absolute difference between the tastiness of the two dishes.
Constraints
Sample 1:
3
3 1
4 4
2 3
1
4
1
Explanation:
Test Case : The possible pairs of are and . Difference in both the cases is , hence the maximum possible absolute difference is .
Test Case : The possible pairs of are , , , and . The maximum possible absolute difference is .
Test Case : The possible pairs of are and . Difference in both the cases is , and hence the maximum possible absolute difference is .
ANSWER