Time limit: 1 second
Memory limit: 256 megabytes
----------
A grid with $n$ rows and $m$ columns consisting of integers between $0$ and $9$ is called **exceptional** if and only if for every cell in the grid containing the number $x$, exactly $x$ of its adjacent to the sides cells(excluding itself) also contain the number $x$.
The numbers $n$ and $m$ are given to you. If an exceptional grid with $n$ rows and $m$ columns exists, report it.
# Input
The first line of input contains the number $t$, the number of test cases.
In each of the following $t$ lines, two natural numbers $n$ and $m$ are given.
$$ 1 \leq t \leq 10^5 $$
$$ \sum n \cdot m \leq 10^6 $$
# Output
For each test case, if at least one exceptional grid exists, print the phrase `Yes`.
Then, in the following $n$ lines, print a string of length $m$ consisting of digits $0$ through $9$ in each line (representing the grid).
If no exceptional grid exists, print the phrase `No`.
When printing `Yes` or `No`, the output is case-insensitive.
# Example
## Sample Input
```
3
1 1
2 2
4 4
```
## Sample Output
```
Yes
0
Yes
22
22
Yes
0222
2212
2012
2222
```
Post an answer to this question
You currently do not have access.