fun main(args:Array<String>) {
	val(h,w,n)= readLine()!!.split(" ").map {it.toInt()}
	val ab = (1..n).map {
		val (y,x)=readLine()!!.split(" ").map {it.toLong()-1}
		return@map y*w+x
	}
	val map = mutableMapOf<Long,Int>()
	ab.forEach {
		for(dy in -1..1)for(dx in -1..1){
			val y=it/w+dy
			val x=it%w+dx
			if(1<=y&&y<=h-2 && 1<=x&&x<=w-2){
				val p=y*w+x
				if(map.containsKey(p)){
					map[p]=map[p]!!+1
				}else{
					map[p]=1
				}
			}
		}
	}
	val ans = map.toList().map{it.second}
					.groupBy {it}.mapValues {it.value.size}
	
	println( (h-2).toLong()*(w-2).toLong() - ans.toList().sumBy {it.second})
	for(i in 1..9){
		if(ans.containsKey(i)){
			println(ans[i])
		}else{
			println(0)
		}
	}
}