output_description: Print your solution in the following format:
  
      
      
      a_{1,1} ... a_{1,N}
      :
      a_{N,1} ... a_{N,N}
      
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
attempt: import math
  
  
  def primes(x):
      if x < 2:
          return []
  
      primes = [i for i in range(x)]
      primes[1] = 0  # 1は素数ではない
  
      for prime in primes:
          if prime > math.sqrt(x):
              break
          if prime == 0:
              continue
          for non_prime in range(2 * prime, x, prime):
              primes[non_prime] = 0
  
      return [prime for prime in primes if prime != 0]
  
  
  def is_prime(x):
      if x < 2:
          return False  # 2未満に素数はない
      if x == 2 or x == 3 or x == 5:
          return True  # 2,3,5は素数
      if x % 2 == 0 or x % 3 == 0 or x % 5 == 0:
          return False  # 2,3,5の倍数は合成数
  
      prime = 7
      step = 4
      while prime <= math.sqrt(x):
          if x % prime == 0:
              return False
  
          prime += step
          step = 6 - step
  
      return True
  
  
  p = primes(10**5)
  
  N = int(input())
  
  for j in range(N):
      ans = ""
      for i in range(N):
          ans += "2" if (i + j) % 2 == 0 else "3"
          if i != N - 1:
              ans += " "
      print(ans)
  
problem_description: Statement
  
  You are given an integer N.
  
  Construct any one N-by-N matrix a that satisfies the conditions below. It can
  be proved that a solution always exists under the constraints of this problem.
  
    * 1 \leq a_{i,j} \leq 10^{15}
    * a_{i,j} are pairwise distinct integers.
    * There exists a positive integer m such that the following holds: Let x and y be two elements of the matrix that are vertically or horizontally adjacent. Then, {\rm max}(x,y) {\rm mod} {\rm min}(x,y) is always m.
samples: [{"input": "2", "output": "4 7\n    23 10\n    \n\n  * For any two elements x and y that are vertically or horizontally adjacent, {\\rm max}(x,y) {\\rm mod} {\\rm min}(x,y) is always 3."}]