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?
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.
For each case, output one integer, indicating the maximum regions.
Example 1