#agc027d. [agc027_d]Modulo Matrix

[agc027_d]Modulo Matrix

Problem Statement

You are given an integer NN.

Construct any one NN-by-NN matrix aa that satisfies the conditions below. It can be proved that a solution always exists under the constraints of this problem.

  • 1leqai,jleq10151 \\leq a_{i,j} \\leq 10^{15}
  • ai,ja_{i,j} are pairwise distinct integers.
  • There exists a positive integer mm such that the following holds: Let xx and yy be two elements of the matrix that are vertically or horizontally adjacent. Then, rmmax(x,y){\\rm max}(x,y) rmmod{\\rm mod} rmmin(x,y){\\rm min}(x,y) is always mm.

Constraints

  • 2leqNleq5002 \\leq N \\leq 500

Input

Input is given from Standard Input in the following format:

NN

Output

Print your solution in the following format:

a1,1a_{1,1} ...... a1,Na_{1,N} :: aN,1a_{N,1} ...... aN,Na_{N,N}


Sample Input 1

2

Sample Output 1

4 7
23 10
  • For any two elements xx and yy that are vertically or horizontally adjacent, rmmax(x,y){\\rm max}(x,y) rmmod{\\rm mod} rmmin(x,y){\\rm min}(x,y) is always 33.