Region#4252

Region

1 second
64 megabytes
Medium

In geometry, lines and circles are both very charming shapes, with a lot of interesting properties. We know a line divides the plane into two regions, so does a circle. But how many regions lines and circles can divide at most?

Input

The first line contains a single integer , indicating the number of test cases. Each test case begins with two integers (0 \le N \le 1000) and (0 \le M \le 1000), indicating the number of lines and circles respectively.

Output

For each case, output one integer, indicating the maximum regions.

Examples

Example 1

Loading
Loading