E. Matrix Construction
time limit per test
1 second
memory limit per test
1024 megabytes
input
standard input
output
standard output

The English statement was translated by AI and may be slightly different from the original Chinese statement. Please refer to the Chinese statement if you have any questions.

Today, Alice wants to fill a permutation of length $$$n \times m$$$$$$^{\dagger}$$$ into an $$$n \times m$$$ matrix $$$A$$$, such that the sum of numbers in any contiguous submatrix with both height and width at least $$$2$$$ is a composite number.

In other words, for any $$$1 \leq a \lt c \leq n, 1 \leq b \lt d \leq m$$$, Alice wants $$$\sum_{i=a}^{c} \sum_{j=b}^{d} A_{i,j}$$$ to be a composite number.

For example, when $$$n=2$$$ and $$$m=3$$$, matrix $$$B$$$ is a valid construction, while matrix $$$C$$$ is not, because $$$C_{1,2}+C_{1,3}+C_{2,2}+C_{2,3}=17$$$.

$$$$$$ B = \begin{bmatrix} 1 & 3 & 2 \\ 6 & 5 & 4 \end{bmatrix}, \quad C = \begin{bmatrix} 1 & 6 & 2 \\ 3 & 5 & 4 \end{bmatrix} $$$$$$

Given $$$n$$$ and $$$m$$$, can the above requirement be satisfied? If yes, output one valid construction.

$$$^{\dagger}$$$ A permutation of length $$$n$$$ is an array containing the integers from $$$1$$$ to $$$n$$$ exactly once in any order. For example, $$$[2,3,1,5,4]$$$ is a permutation, while $$$[1,2,2]$$$ is not (since $$$2$$$ appears twice), and $$$[1,3,4]$$$ is not (since $$$n=3$$$ but the array contains $$$4$$$).

Input

There is only one test case in each test file.

The first line contains two integers $$$n$$$ and $$$m$$$ ($$$2 \leq n, m \leq 50$$$).

Output

For the test case, on the first line output whether a valid construction exists. If it exists, output "Yes"; otherwise, output "No".

If a valid construction exists, you should also output $$$n$$$ lines, each containing $$$m$$$ integers. The $$$j$$$-th number on the $$$i$$$-th line denotes the number at row $$$i$$$, column $$$j$$$ of the matrix. You must ensure that the multiset of all output numbers forms a permutation of length $$$n \times m$$$. If there are multiple valid constructions, you may output any of them.

Examples
Input
2 3
Output
Yes
1 3 2
6 5 4
Input
3 3
Output
Yes
5 4 3
6 9 8
7 2 1