
mat = Array.new(14){Array.new(14){0}}
while input = gets
  x, y, s = input.split(",").map(&:to_i)
  x += 2
  y += 2
  mat[x][y] += 1
  mat[x+1][y] += 1
  mat[x][y+1] += 1
  mat[x-1][y] += 1
  mat[x][y-1] += 1
  if s > 1
    mat[x+1][y+1] += 1
    mat[x+1][y-1] += 1
    mat[x-1][y+1] += 1
    mat[x-1][y-1] += 1
  end
  if s > 2
    mat[x+2][y] += 1
    mat[x-2][y] += 1
    mat[x][y+2] += 1
    mat[x][y-2] += 1
  end
end

max = 0
white = 0
10.times{|i|
  10.times{|j|
    max = mat[i+2][j+2] if mat[i+2][j+2] > max
    white += 1 if mat[i+2][j+2] == 0
  }
}
puts white
puts max