object Main extends App {
  val sc = new FastScanner(System.in)
  val h, w = sc.nextLong()
  val n = sc.nextInt()
  val ab = List.fill(n)((sc.nextInt(), sc.nextInt()))
  var m = Map[(Int, Int), Int]().withDefaultValue(0)
  for ((a, b) <- ab) {
    for {
      i <- -1 to 1
      j <- -1 to 1
      if 1 < a+i && a+i < h && 1 < b+j && b+j < w
    } {
      m += (a+i, b+j) -> (m((a+i, b+j)) + 1)
    }
  }

  val count = m.values.groupBy(identity).view.mapValues(_.size)
  println((w-2) * (h-2) - count.values.sum)
  for (i <- 1 to 9) {
    println(count.getOrElse(i, 0))
  }
}

class FastScanner(source: java.io.InputStream) {
  val buf = new Array[Byte](1024)
  var now, end = 0

  def isPrintable(b: Byte): Boolean = 33 <= b && b <= 126
  def isNum(b: Byte): Boolean = 48 <= b && b <= 57

  def hasNextByte: Boolean = {
    if (now < end) {
      true
    } else {
      now = 0
      end = source.read(buf)
      end > 0
    }
  }

  def nextByte(): Byte = {
    if (hasNextByte) {
      val b = buf(now)
      now += 1
      b
    } else {
      -1
    }
  }

  def hasNext: Boolean = {
    while (hasNextByte && !isPrintable(buf(now))) {
      now += 1
    }
    hasNextByte
  }

  def next(): String = {
    if (hasNext) {
      val sb = new StringBuilder()
      var b = nextByte()
      while (isPrintable(b)) {
        sb += b.toChar
        b = nextByte()
      }
      sb.toString
    } else {
      throw new NoSuchElementException()
    }
  }

  def nextInt(): Int = {
    nextLong().toInt
  }

  def nextLong(): Long = {
    if (hasNext) {
      var b = nextByte()
      var sign = 1
      var n = 0L
      if (b == '-') {
        sign = -1
        b = nextByte()
      }
      while (isNum(b)) {
        n = n * 10 + (b - 48)
        b = nextByte()
      }
      sign * n
    } else {
      throw new NoSuchElementException()
    }
  }

  def nextDouble(): Double = next().toDouble
}
