K. Matrix
time limit per test
2 seconds
memory limit per test
1024 megabytes
input
standard input
output
standard output

Construct a matrix of $$$n$$$ rows and $$$n$$$ columns, satisfying all the following constraints:

  • The elements of the matrix are integers ranging from $$$1$$$ to $$$2n$$$ (both inclusive).
  • Each integer from $$$1$$$ to $$$2n$$$ (both inclusive) should appear at least once in the matrix.
  • Let $$$a_{i, j}$$$ be the element in the $$$i$$$-th row and the $$$j$$$-th column, there exists exactly one integer quadruple $$$(x, y, z, w)$$$ such that:
    • $$$1 \le x \lt z \le n$$$.
    • $$$1 \le y \lt w \le n$$$.
    • $$$a_{x, y}$$$, $$$a_{x, w}$$$, $$$a_{z, y}$$$, $$$a_{z, w}$$$ are pairwise different.
Input

There is only one test case in each test file.

The first and only line of the input contains one integer $$$n$$$ ($$$2\leq n\leq 50$$$) indicating the size of the matrix.

Output

If it is possible to construct such a matrix, first output Yes in one line. Then output $$$n$$$ lines where the $$$i$$$-th line contains $$$n$$$ integers $$$a_{i, 1}, a_{i, 2}, \cdots, a_{i, n}$$$ ($$$1 \le a_{i, j} \le 2n$$$) separated by a space, where $$$a_{i, j}$$$ is the element in the $$$i$$$-th row and the $$$j$$$-th column. If there are multiple valid answers, you can output any of them.

If it is impossible to construct such a matrix, just output No in one line.

Examples
Input
2
Output
Yes
1 2
3 4
Input
3
Output
Yes
3 2 6
4 3 3
3 1 5