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: n = 1176
  r = int((n * 2) ** 0.5)
  # nは三角数
  res = [[] for i in range(r + 1)]
  tmp = 0
  for i in range(r - 1):
      # 添字iに[1,2,...,r-i]
      # 添字i+1以降に[1,2,3...]
      for k in range(tmp, r - i + tmp):
          res[i].append(k + 1)
          res[i + k - tmp + 1].append(k + 1)
      # for j in range(i+1,r+1):
      #    res[j].append(tmp+j)
      tmp += r - i
  res[-2].append(n)
  res[-1].append(n)
  
  print(n, len(res[0]))
  for l in res:
      print(*l)
  
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: []