fun main(args: Array<String>) {
    val (h, w, n) = readIntegers()
    val map = hashMapOf<Point, Int>()
    for (i in 0 until n) {
        val (a, b) = readIntegers()

        if ((a in 2 until h) && (b in 2 until w)) {
            val point = Point(a, b)
            map[point] = map.getOrElse(point) { 0 } + 1
        }

        for (j in -1..1) {
            val row = a + j
            if (!(row in 2 until h)) {
                continue
            }

            for (k in -1..1) {
                val column = b + k
                if (!(column in 2 until w)) {
                    continue
                }

                if (j == 0 && k == 0) {
                    continue
                }

                val tmp = Point(row, column)
                map[tmp] = map.getOrElse(tmp) { 0 } + 1
            }
        }
    }

    val zeroCount = (h - 2).toLong() * (w - 2).toLong() - map.count()
    println(zeroCount)
    for (i in 1..9) {
        println(map.values.count { it == i })
    }
}

fun readStrings() = readLine()!!.split(" ")
fun readIntegers() = readStrings().map(String::toInt)

data class Point(val row: Int, val column: Int)
