Scissors

Vilius and Adomas are playing a game. They both share a rectangular paper with dimension M × N. The game proceeds as follows:

Therefore, in one turn player cuts every rectangle (except 1 × 1) into two smaller rectangles. The player who cuts the last 1 × 2 rectangle into 1 × 1 is declared a winner. Adomas is very clever so he always makes best cuts. However, since good start is half success, you shall help Vilius make the first cut.

In the input file you are given one integer T (1 ≤ T ≤ 1000), the number of test cases. The following T lines contain 2 integers (M and N, 1 ≤ M, N ≤ 400) each, representing separate test case.

You shall output T lines to the output file, each containing one of the possible output variants for given dimensions of a particular paper M × N,

Input Output Comment
4
1 1
1 2
1 3
1 4
-1
H 1
-1
H 1
Can’t cut 1 × 1
Winning condition – cut 1 × 2
Adomas wins by cutting 1 × 2
One way is to cut horizontally making 1 × 1 and 1 × 3