arr = []
10.times { arr << 10.times.map{ 0 } }

while gets do
  x, y, size = $_.split(/,/).map(&:to_i)

  if size >= 1
    arr[x + 1][y] += 1 if x + 1 <= 9
    arr[x - 1][y] += 1 if x - 1 >= 0
    arr[x][y]     += 1
    arr[x][y + 1] += 1 if y + 1 <= 9
    arr[x][y - 1] += 1 if y - 1 >= 0
  end

  if size >= 2
    arr[x + 1][y + 1] += 1 if x + 1 <= 9 && y + 1 <= 9
    arr[x + 1][y - 1] += 1 if x + 1 <= 9 && y - 1 >= 0
    arr[x - 1][y + 1] += 1 if x - 1 >= 0 && y + 1 <= 9
    arr[x - 1][y - 1] += 1 if x - 1 >= 0 && y - 1 >= 0
  end

  if size == 3
    arr[x + 2][y] += 1 if x + 2 <= 9
    arr[x - 2][y] += 1 if x - 2 >= 0
    arr[x][y + 2] += 1 if y + 2 <= 9
    arr[x][y - 2] += 1 if y - 2 >= 0
  end
end

sum = 0
max = 0
arr.each do |in_arr|
  in_arr.each{ |v|
    sum += 1 if v == 0
    max = v  if v > max
  }
end
puts sum, max