ary = Array.new(10){ Array.new(10, 0) }
loop do
	s = gets
	if !s then
		break
	end
	(x, y, size) = s.split(",").map{|v| v.to_i}
	dx = Array.new(); dy = Array.new();
	if size == 1 then
		dx = [0, -1, 0, 1, 0]; dy = [-1, 0, 0, 0, 1]
	elsif size == 2 then
		dx = [-1, 0, 1, -1, 0, 1, -1, 0, 1]; dy = [-1, -1, -1, 0, 0, 0, 1, 1, 1]
	else
		dx = [0, -1, 0, 1, -2, -1, 0, 1, 2, -1, 0, 1, 0]; dy = [-2, -1, -1, -1, 0, 0, 0, 0, 0, 1, 1, 1, 2]
	end
	dx.size.times do |i|
		tmpx = dx[i] + x; tmpy = dy[i] + y;
		if tmpx >= 10 || tmpx < 0 || tmpy >= 10 || tmpy < 0 
			next
		end
		ary[tmpx][tmpy] += 1
	end
end

c = 0
m = 0

ary.each {|a|
	m = [m, a.max].max
	c += a.count(0)
}

puts c, m