Easy Triangles#12227

Easy Triangles

1 second
256 megabytes
Very easy

You're given two integers , . Count how many integers form a non-degenerate triangle with sides (a,b,x).

^{\text{*}} A triangle with side lengths a,b,c is considered non-degenerate if a+b>c, a+c>b and b+c>a holds.

Input

The first line contains single integer (1 \le t \le 10^4) – the number of test cases.

The only line of each test case contains two integers (1 \le a,b \le 10^4) – the known two side lengths of the triangle.

Output

For each test case , output how many form a non-degenerate triangle.

Examples

Example 1

Loading
Loading

Note

In the first test case only x=5 works.

In the second test case x=2,3,4 work.

Scoring

  1. Subtask ( points) : a=b

  2. Subtask ( points) : \sum a+b \le 10^5.

  3. Subtask ( points) : No additional constraints.