D. Disaster Walker
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

You live in a city that is modeled as a rectangular grid. Each cell in the city is a unit square, and the grid follows a standard Cartesian coordinate system where the $$$x$$$-axis increases from left to right and the $$$y$$$-axis increases from bottom to top.

A cyclone named Gigantomachia has formed at the bottom-left corner of the city, located at the point $$$(0, 0)$$$. According to meteorological forecasts, the cyclone will travel in a straight line towards the top-right corner of the city, located at the point $$$(x, y)$$$. The cyclone is immensely powerful, and every cell that it enters along its path will be damaged.

Your task is to determine the number of cells in the city that will be damaged by the cyclone.

Input

The first line of the input contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases.

Each test case consists of a single line containing two space-separated integers $$$x$$$ and $$$y$$$ ($$$1 \le x, y \le 10^9$$$) — the width and height of the city.

Output

For each test case, output a single integer in a line — the number of cells that will be damaged by the cyclone.

Example
Input
2
2 3
5 5
Output
4
5
Note

Illustrations of the sample test cases: