Bob is making yet another grid-based painting for his school's art exhibit. This year, he decided to take some inspiration from Alice and inject some fun mathematics into his construction this year!
A magic square is an $$$n \times n$$$ grid such that:
| 30 | 16 | 18 | 36 |
| 10 | 44 | 22 | 24 |
| 32 | 14 | 20 | 34 |
| 28 | 26 | 40 | 6 |
| 80 | 55 | 73 | 33 |
| 1 | 4 | 8 | 26 |
| 98 | 37 | 91 | 15 |
| 62 | 44 | 69 | 66 |
Bob will pre-fill in at most two values in an $$$n \times n$$$ grid, since those values at those position are very important for the message he wants to communicate with his art. Can you help him by constructing any Mondrialayagic square around them? That is, find any Mondrialayagic square that has those pre-filled values at those positions.
If none exist, you should say so as well.
The first line of input contains a single integer $$$T$$$, denoting the number of test cases. The descriptions of $$$T$$$ test cases follow.
The first line of each test case contains a single integer $$$n$$$.
Then, $$$n$$$ lines follow, each containing a row of $$$n$$$ values.
For each test case...
If the task is impossible, output a single line containing the word NO.
If the task is possible, first output a line containing the word YES, followed by your Mondrialayagic square.
This should be $$$n$$$ lines, each containing $$$n$$$ space-separated positive integers. This must be a valid Mondrialayagic square, and the values specified in the input must still be there at their same positions.
If there are multiple possible solutions, any will be accepted.
$$$$$$\begin{align*}
&\begin{array}{|l|} \hline \text{Constraints For All Subtasks} \\ \hline 1 \leq T \leq 5000 \\ 3 \leq n \leq 6 \\ \text{The pre-filled squares contain distinct values from $1$ to $101$.} \\ \hline \end{array}\\
&\begin{array}{|c|c|l|} \hline \text{Subtask} & \text{Points} & \text{Constraints} \\ \hline 1 & \mathbf{23} & \text{There are no pre-filled squares.} \\ \hline 2 & \mathbf{33} & \text{There is at most one pre-filled square.} \\ \hline 3 & \mathbf{44} & \text{There are at most two pre-filled squares.} \\ \hline \end{array}\\
\end{align*}$$$$$$
1 4 ? ? ? ? 1 ? ? ? ? ? ? ? ? ? 69 ?
YES 80 55 73 33 1 4 8 26 98 37 91 15 62 44 69 66