import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val grid = Array(14, { IntArray(14) })
    while (sc.hasNext()) {
        var (x, y, s) = sc.next().split(",").map { Integer.parseInt(it) }
        x+=2; y+=2
        if (s >= 2) {
            for (i in y-1..y+1) {
                for (j in x-1..x+1) grid[i][j]++
            }
            if (s == 3) {
                for ((i, j) in arrayOf(Pair(y-2, x), Pair(y+2, x), Pair(y, x-2), Pair(y, x+2))) grid[i][j]++
            }
        }
        else {
            for ((i, j) in arrayOf(Pair(y, x), Pair(y-1, x), Pair(y+1, x), Pair(y, x-1), Pair(y, x+1))) {
                grid[i][j]++
            }
        }
    }
    var white = 0
    var depth = 0
    for (i in 2..11) for (j in 2..11) {
        if (grid[i][j] == 0) white++
        depth = Math.max(depth, grid[i][j])
    }
    println(white)
    println(depth)
}
