a=Array.new(12);
a.map!{|i| Array.new(12,0) }
cnt=m=0

while true
	begin
		x,y,siz=gets.split(",").map{|i|i.to_i}
		a[x][y]+=1
		a[x+1][y]+=1
		a[x-1][y]+=1
		a[x][y+1]+=1
		a[x][y-1]+=1
		if siz>1
			a[x+1][y+1]+=1
			a[x+1][y-1]+=1
			a[x-1][y+1]+=1
			a[x-1][y-1]+=1
		end
		if siz==3
			a[x+2][y]+=1
			a[x-2][y]+=1
			a[x][y+2]+=1
			a[x][y-2]+=1
		end
	rescue
		break
	end
end

for i in 0..9 
	for j in 0..9
		cnt+=1 if a[i][j]==0
		m=a[i][j] if m<a[i][j]
	end
end

puts cnt,m