PROGRAMMING:Learn chess
Cai Yun, who has just studied chess, wants to know how the horse on the chessboard goes. So he asks the students of CPA Association. If you are the student being asked, you can tell her that starting from (I, J), you can walk (I + 2, j + 1), (I-2, j + 1), (I-2, J-1), (I + 1, j + 2), (I + 1, J-2), (I + 1, J-2), (i-1, j + 2), (i-1, j + 2), (i-1, j + 2), (I-1, j + 2), (i-1, j + 2), (i-1, j + 2), (i-1, j + 1, j + 2), (i-1, j +, If you want to show off, you can easily type a code. The requirement is that there is a matrix of M * n (m horizontal lines, n vertical lines). You can choose any point to start. According to the way the horse walks, you can walk through as many different places as possible (you can walk infinitely).
###Input format:
In the first line, enter a number T (T < = 10), which means t group data.
For each group of test data, m, n (m, n < = 10 ^ 8) is given.
###Output format:
For each group of data, a number is given to indicate how many different places can be traveled at most.
###Input example:
Here is a set of inputs. For example:
```in
one
3 3
```
###Output example:
The corresponding output is given here. For example:
```out
eight
```
answer:If there is no answer, please comment
###Input format:
In the first line, enter a number T (T < = 10), which means t group data.
For each group of test data, m, n (m, n < = 10 ^ 8) is given.
###Output format:
For each group of data, a number is given to indicate how many different places can be traveled at most.
###Input example:
Here is a set of inputs. For example:
```in
one
3 3
```
###Output example:
The corresponding output is given here. For example:
```out
eight
```
answer:If there is no answer, please comment