output_description: Print the string putting a single space between the first 4 letters and last 8
  letters in the string s. Put a line break at the end.
  
  * * *
input_description: The input is given from Standard Input in the following format:
  
      
      
      s
attempt: """難しいすぎるよぅ..."""
  
  
  def solve():
      R, C = list(map(int, input().split()))
      N = int(input())
      row = [[] for _ in range(R)]
      field = {}
      for _ in range(N):
          r, c, a = list(map(int, input().split()))
          r, c = r - 1, c - 1
          row[r].append((c, a))
          field[(r, c)] = a
      row = [sorted(r) for r in row]
      for rn, r in enumerate(row):
          for i, e1 in enumerate(r):
              for e2 in r[i + 1 :]:
                  n = e2[0] - e1[0]
                  print(r, e1, e2, n)
                  if n > C:
                      break
                  a = field.get((rn + n, e1[0]), None)
                  b = field.get((rn + n, e2[0]), None)
                  if a is None and b is None:
                      continue
                  if a is None:
                      if e1[1] + b - e2[1] < 0:
                          return False
                  elif b is None:
                      if e2[1] + a - e1[1] < 0:
                          return False
                  else:
                      if e1[1] + b == e2[1] + a:
                          return False
      return True
  
  
  print("Yes" if solve() else "No")
  
problem_description: Statement
  
  This contest is `CODE FESTIVAL`. However, Mr. Takahashi always writes it
  `CODEFESTIVAL`, omitting the single space between `CODE` and `FESTIVAL`.
  
  So he has decided to make a program that puts the single space he omitted.
  
  You are given a string s with 12 letters. Output the string putting a single
  space between the first 4 letters and last 8 letters in the string s.
samples: [{"input": "CODEFESTIVAL", "output": "CODE FESTIVAL\n    \n\nPutting a single space between the first 4 letters and last 8 letters in\n`CODEFESTIVAL` makes it `CODE FESTIVAL`.\n\n* * *"}, {"input": "POSTGRADUATE", "output": "POST GRADUATE\n    \n\n* * *"}, {"input": "ABCDEFGHIJKL", "output": "ABCD EFGHIJKL"}]