output_description: Print 10 lines. The (j+1)-th ( 0 \leq j \leq 9 ) line should contain the
  number of the subrectangles of size 3×3 of the grid that contains exactly j
  black cells.
  
  * * *
input_description: The input is given from Standard Input in the following format:
  
      
      
      H W N
      a_1 b_1
      :
      a_N b_N
attempt: import sys
  
  input = sys.stdin.readline
  
  H, W, N = map(int, input().split())
  point = set([])
  ans = [0 for i in range(0, 10)]
  ans[0] = (H - 2) * (W - 2)
  
  
  def black(x, y):
      ans = 0
      if (x - 1, y - 1) in point:
          ans += 1
      if (x - 1, y) in point:
          ans += 1
      if (x - 1, y + 1) in point:
          ans += 1
  
      if (x, y - 1) in point:
          ans += 1
      if (x, y) in point:
          ans += 1
      if (x, y + 1) in point:
          ans += 1
  
      if (x + 1, y - 1) in point:
          ans += 1
      if (x + 1, y) in point:
          ans += 1
      if (x + 1, y + 1) in point:
          ans += 1
  
      return ans
  
  
  for _ in range(0, N):
      a, b = map(int, input().split())
      if a > 2:
          if b > 2:
              ss = black(a - 1, b - 1)
              ans[ss] -= 1
              ans[ss + 1] += 1
  
          if W > b > 1:
              ss = black(a - 1, b)
              ans[ss] -= 1
              ans[ss + 1] += 1
  
          if W - 1 > b:
              ss = black(a - 1, b + 1)
              ans[ss] -= 1
              ans[ss + 1] += 1
      if H > a > 1:
          if b > 2:
              ss = black(a, b - 1)
              ans[ss] -= 1
              ans[ss + 1] += 1
  
          if W > b > 1:
              ss = black(a, b)
              ans[ss] -= 1
              ans[ss + 1] += 1
  
          if W - 1 > b:
              ss = black(a, b + 1)
              ans[ss] -= 1
              ans[ss + 1] += 1
  
      if H - 1 > a:
          if b > 2:
              ss = black(a + 1, b - 1)
              ans[ss] -= 1
              ans[ss + 1] += 1
          if W > b > 1:
              ss = black(a + 1, b)
              ans[ss] -= 1
              ans[ss + 1] += 1
  
          if W - 1 > b:
              ss = black(a + 1, b + 1)
              ans[ss] -= 1
              ans[ss + 1] += 1
  
      point.add((a, b))
  
  for i in range(0, 10):
      print(ans[i])
  
problem_description: Statement
  
  We have a grid with H rows and W columns. At first, all cells were painted
  white.
  
  Snuke painted N of these cells. The i-th ( 1 \leq i \leq N ) cell he painted
  is the cell at the a_i-th row and b_i-th column.
  
  Compute the following:
  
    * For each integer j ( 0 \leq j \leq 9 ), how many subrectangles of size 3×3 of the grid contains exactly j black cells, after Snuke painted N cells?
samples: [{"input": "4 5 8\n    1 1\n    1 4\n    1 5\n    2 3\n    3 1\n    3 2\n    3 4\n    4 4", "output": "0\n    0\n    0\n    2\n    4\n    0\n    0\n    0\n    0\n    0\n    \n\n![](https://atcoder.jp/img/arc061/30326702be007759dce81231012a8353.png)\n\nThere are six subrectangles of size 3\u00d73. Two of them contain three black cells\neach, and the remaining four contain four black cells each.\n\n* * *"}, {"input": "10 10 20\n    1 1\n    1 4\n    1 9\n    2 5\n    3 10\n    4 2\n    4 7\n    5 9\n    6 4\n    6 6\n    6 7\n    7 1\n    7 3\n    7 7\n    8 1\n    8 5\n    8 10\n    9 2\n    10 4\n    10 9", "output": "4\n    26\n    22\n    10\n    2\n    0\n    0\n    0\n    0\n    0\n    \n\n* * *"}, {"input": "1000000000 1000000000 0", "output": "999999996000000004\n    0\n    0\n    0\n    0\n    0\n    0\n    0\n    0\n    0"}]