{-# LANGUAGE TupleSections #-}
import Control.Monad
import Data.List
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import Data.IntMap.Strict (IntMap)
import qualified Data.IntMap.Strict as IntMap

type View = (Int, Int)
type Spot = (Int, Int)
type CountMap = Map View Int

putSpot :: (Int, Int) -> CountMap -> Spot -> CountMap
putSpot size counts spot = foldl' inc counts $ viewsFor spot size
  where viewsFor (x, y) (w, h) = do
          j <- [(max 1 (y - 2)) .. (min (h - 2) y)]
          i <- [(max 1 (x - 2)) .. (min (w - 2) x)]
          return (i, j)
        inc counts spot = Map.insertWith (+) spot 1 counts

readLine :: String -> (Int, Int)
readLine s = (x, y)
  where [y, x] = read <$> words s

main :: IO ()
main = do
  [h, w, n] <- (fmap read . words) <$> getLine
  spots <- replicateM n $ readLine <$> getLine
  let counts = foldl' (putSpot (w, h)) Map.empty spots
      res = Map.foldl' (\a b -> IntMap.insertWith (+) b 1 a) IntMap.empty counts
      display i = print $ IntMap.findWithDefault 0 i res
  mapM_ display [0..9]
