module SqIntMap = Map.Make (struct
  type t = int * int
  let compare = compare
end)

module IntMap = Map.Make (struct
  type t = int
  let compare = compare
end)

let () =
  let h, w, n = Scanf.scanf "%d %d %d\n" (fun h w n -> h, w, n) in
  let abs = Array.init n (fun _ -> Scanf.scanf "%d %d\n" (fun a b -> a, b)) in
  let dxdys = List.concat @@ Array.to_list @@ Array.init 3 (fun i -> Array.to_list @@ Array.init 3 (fun j -> (i - 2, j - 2))) in
  Array.fold_left (fun m (a, b) ->
    List.fold_left (fun m (dx, dy) ->
      if 1 <= a + dy && a + dy <= h - 2 && 1 <= b + dx && b + dx <= w - 2 then
        SqIntMap.add (a + dy, b + dx) (1 + try SqIntMap.find (a + dy, b + dx) m with Not_found -> 0) m
      else m) m dxdys) SqIntMap.empty abs
  |> (fun m -> SqIntMap.fold (fun _ i m -> IntMap.add i (1 + try IntMap.find i m with Not_found -> 0) m) m IntMap.empty)
  |> (fun m ->
      Array.init 10 (function
        | 0 -> (h - 2) * (w - 2) - IntMap.fold (fun _ -> ( + )) m 0
        | n -> try IntMap.find n m with Not_found -> 0))
  |> Array.iter (Printf.printf "%d\n")