import Data.Set( member, insert, empty, foldl', elems)
import qualified Data.Set as S
import Control.Monad( replicateM, foldM)
import Data.Maybe( fromJust)
import Data.List( foldl', (\\))
import qualified Data.List as L
import Data.Array.IO( IOArray, newArray, writeArray
		    ,	readArray, getElems, freeze)
import Data.Array(Array, elems)
main = do
    let getElements = return . map read . words =<< getLine
	getPos = do
	    [r,c] <- getElements
	    return (r,c)
    [h,w,n] <- getElements
    poss <- replicateM n getPos
    let reverseJudge = 2*n<fromIntegral h * fromIntegral w
	table = L.foldl' (\st pos->insert pos st) empty poss'
	    where poss' = if reverseJudge
			    then [(r,c)|r<-[1..h],c<-[1..w]]\\poss
			    else poss
	searchingFlames (baseR,baseC) = do
	    let left = max 1 (baseC-2)
		right = min (w-2) baseC
		top = max 1 (baseR-2)
		bottom = min (h-2) baseR
	    (ro,co) <- [(r,c) | r <- [top..bottom]  ,
				c <- [left..right]  ]
	    return [(r,c) | r <- [ro..ro+2], c <- [co..co+2]]
	count::[(Int,Int)]->(Int,Int)->Maybe Int
	count box base = do
	    let check ij
		  | member ij table = if ij<base
					then Nothing
					else Just 1
		  | otherwise = Just 0
	    return . sum =<< mapM check box
	countArround p = map fromJust . filter (Nothing/=) .
			    map (`count` p) . searchingFlames $ p
    inicArray <- newArray (0,9) 0
    let countIncl carr ix = do
	    v <- readArray carr ix
	    writeArray carr ix (succ v)
	    return carr
	rec::IOArray Int Integer->(Int,Int)->IO (IOArray Int Integer)
	rec carr = foldM countIncl carr . countArround
    answer <- foldM rec inicArray $ S.elems table
    except0 <- return . sum =<< getElems answer
    let numFlames = (fromIntegral h-2)*(fromIntegral w-2)
    writeArray answer 0 $ numFlames - except0
    normalData <- return . Data.Array.elems =<< freeze answer
    finalData <- if reverseJudge
		    then return $ reverse normalData
		    else return $ normalData
    mapM_ print finalData