The little white rabbit has a magical palette with a grid of $$$n$$$ rows and $$$m$$$ columns. Before starting to mix the colors, the little white rabbit will squeeze a kind of pigment to the left of each row, denoted by $$$a_1, a_2, \ldots, a_n$$$, and also squeeze a kind of pigment above each column, denoted by $$$b_1, b_2, \ldots, b_m$$$.
There are a total of $$$n \times m$$$ kinds of selectable pigments, represented by integers $$$0, 1, 2, \ldots, nm-1$$$ for different pigments. Then, in the cell of the $$$i$$$-th row and the $$$j$$$-th column, the little white rabbit will mix a color $$$c_{i,j} = a_ib_j \bmod nm$$$ using the pigment $$$a_i$$$ to the left of the $$$i$$$-th row and the pigment $$$b_j$$$ above the $$$j$$$-th column.
The little white rabbit hopes that each of the $$$n \times m$$$ cells has a different color, and you need to find out whether it can be achieved.
The first line of the input contains an integer $$$T$$$ ($$$1 \le T \le 10^4$$$), indicating the number of test cases. For each test case:
The only line contains two integers $$$n$$$ and $$$m$$$ ($$$1 \le n, m \le 10^6$$$, $$$1 \le n \times m \le 10^6$$$), indicating the number of rows and the number of columns.
It is guaranteed that the sum of $$$n \times m$$$ over all test cases does not exceed $$$10^6$$$.
For each test case, if no solution exists, output "No" (without quotes) in one line. Otherwise, output three lines:
22 32 2
Yes 1 2 1 3 5 No
For the first sample case, $$$[c_{1,1}, c_{1,2}, c_{1,3}, c_{2,1}, c_{2,2}, c_{2,3}] = [1, 3, 5, 2, 0, 4]$$$, which are pairwise different.
| Name |
|---|


