{-# LANGUAGE OverloadedStrings #-}
-- AtCoder My Practice
-- author: Leonardone @ NEETSDKASU

import qualified Data.Set              as S
import qualified Data.Text             as T
import qualified Data.Array            as A
import qualified Text.Printf           as P
import qualified Data.ByteString.Char8 as C
import qualified Data.List             as L
import qualified Data.IntMap           as I
import qualified Data.Map              as M
import Data.Maybe (fromJust)
import Data.Ix    (inRange)

mapread = map $ fst . fromJust . C.readInt
 
-- 解説読後
-- http://arc061.contest.atcoder.jp/data/arc/061/editorial.pdf

main = putStrLn . unlines . map show . solve . map (mapread . C.words) . C.lines =<< C.getContents

solve ([h, w, n]:xs) = ans where
    ans = [I.findWithDefault 0 k res | k <- [0 .. 9]]
    f mp [y, x] = L.foldl' (\m k -> M.insertWith (+) k 1 m) mp [(y - dy, x - dx) | dy <- [1 .. 3], dx <- [1 .. 3]]
    flt = M.filterWithKey (\(y, x) _ -> inRange (0, h - 3) y && inRange (0, w - 3) x)
    g = L.foldl' (\m c -> I.insertWith (+) c 1 m) I.empty . M.elems
    tmp = g . flt $ L.foldl' f M.empty xs
    res = I.insert 0 ((-) ((h - 2) * (w - 2)) . sum $ I.elems tmp) tmp
