local h, w, n = io.read("*n", "*n", "*n")
local t = {}

local function add(i_h, i_w)
  if not t[i_h] then t[i_h] = {} end
  local v = t[i_h][i_w]
  if v then t[i_h][i_w] = v + 1 else t[i_h][i_w] = 1 end
end

local function subtask(ah, bw)
  if 3 <= bw then add(ah, bw - 2) end
  if 2 <= bw and bw < w then add(ah, bw - 1) end
  if bw < w - 1 then add(ah, bw) end
end

for i = 1, n do
  local ah, bw = io.read("*n", "*n")
  if 3 <= ah then subtask(ah - 2, bw) end
  if 2 <= ah and ah  < h then subtask(ah - 1, bw) end
  if ah < h - 1 then subtask(ah, bw) end
end

local sum = 0
local tbl = {}
for i = 1, 9 do tbl[i] = 0 end
for k, v in pairs(t) do
  for k2, v2 in pairs(v) do
    tbl[v2] = tbl[v2] + 1
    sum = sum + 1
  end
end
local rem = (h - 2LL) * (w - 2LL) - sum
local str = tostring(rem):gsub("LL", "")
print(str)
for i = 1, 9 do print(tbl[i]) end
