output_description: In the first line, print N and K separated by a space.
  
  In the subsequent N lines, print your solution. The i-th of these lines must
  contain the K integers written on the i-th sheet, with spaces in between.
  
  * * *
input_description: There is no input in this problem.
attempt: ha = co = None
  
  
  def solve(N):
      global ha, co
      cont = set([0])
      has = set([0])
      for i in range(N):
          if i not in cont:
              ok = 1
              for j in cont:
                  if j == 0:
                      continue
                  if (i - j) % N in has:
                      ok = 0
                      break
              if ok:
                  has.add(i)
                  cont.add(i)
                  gen = set()
                  for j in cont:
                      gen.add((i - j) % N)
                  cont |= gen
      # print(has, len(cont))
      ha = has
      co = cont
      return len(cont) == N
  
  
  for i in range(1000, 2001):
      if solve(i):
          N = len(co)
          K = len(ha)
          print(N, K)
          for i in range(N):
              res = []
              for e in ha:
                  res.append(((e + i) % N) + 1)
              print(*res)
  
          # print(i)
          break
      # print(i)
  
problem_description: Statement
  
  Select any integer N between 1000 and 2000 (inclusive), and any integer K not
  less than 1, then solve the problem below.
samples: []