# coding: utf-8

class DroppingInk
  def solve
    @area = Array.new(10).map { Array.new(10, 0) }

    while line = gets do
      x, y, size = line.chomp.split(",").map {|s| s.to_i}

      #puts "#{x} #{y} #{size}"
      @area[y][x] += 1
      case size
      when 1 then
        # 小の滴
        drop_s(x, y)
      when 2 then
        # 中の滴
        drop_m(x, y)
      when 3 then
        # 大の滴
        drop_l(x, y)
      end
      #dump
    end
    zero = 0
    max = 0
    @area.each do |a|
      a.each do |b|
        if b == 0 then
          zero += 1
        end
        if max < b then
          max = b
        end
      end
    end

    puts zero
    puts max
  end

  def dump
    @area.each do |a|
      a.each do |b|
        print b, " "
      end
      print "\n"
    end
    print "\n"
  end

  def drop_l(x, y)
    drop_m(x, y)
    if x - 2 >= 0 then
      @area[y][x - 2] += 1
    end
    if x + 2 < 10 then
      @area[y][x + 2] += 1
    end
    if y - 2 >= 0 then
      @area[y - 2][x] += 1
    end
    if y + 2 < 10 then
      @area[y + 2][x] += 1
    end
  end

  def drop_m(x, y)
    drop_s(x, y)
    if (x - 1 >= 0) && (y - 1 >= 0) then
      @area[y - 1][x - 1] += 1
    end
    if (x + 1 < 10) && (y - 1 >= 0) then
      @area[y - 1][x + 1] += 1
    end
    if (x - 1 >= 0) && (y + 1 < 10) then
      @area[y + 1][x - 1] += 1
    end
    if (x + 1 < 10) && (y + 1 < 10) then
      @area[y + 1][x + 1] += 1
    end
  end

  def drop_s(x, y)
    if x - 1 >= 0 then
      @area[y][x - 1] += 1
    end
    if x + 1 < 10 then
      @area[y][x + 1] += 1
    end
    if y - 1 >= 0 then
      @area[y - 1][x] += 1
    end
    if y + 1 < 10 then
      @area[y + 1][x] += 1
    end
  end
end

DroppingInk.new.solve