A. King Supremacy
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

There is a chessboard containing $$$n$$$ rows and $$$m$$$ columns. Cell at the $$$i^{th}$$$ row and $$$j^{th}$$$ column is denoted as $$$(i,j)$$$. Cell $$$(i,j)$$$ is colored white if $$$(i+j)$$$ is even; otherwise, it is colored black.

Your task is to place the maximum kings on white cells such that no two kings attack each other.

Two kings will attack each other if their cells are adjacent by edge or corner.

Input

Each test contains multiple test cases. The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 10^4$$$). The description of the test cases follows.

The first line of each testcase contains two space-separated integers $$$n$$$ and $$$m$$$ ($$$1 \le n,m \le 100$$$).

Output

For each test case, print a single integer — the maximum number of kings placed on the given chessboard which satisfies the given condition.

Example
Input
6
2 3
6 1
4 4
7 8
6 7
4 9
Output
2
3
4
16
12
10