#include<iostream>

int data[10][10];

int main(){
	int count=0,max=0;
	int x,y,size;
	char c;
	while(std::cin>>x>>c>>y>>c>>size){
		if(size==1){
			data[y-1][x]++;
			data[y][x]++;data[y][x-1]++;data[y][x+1]++;
			data[y+1][x]++;
		}else if(size==2){
			data[y-1][x]++;data[y-1][x-1]++;data[y-1][x+1]++;
			data[y][x]++;data[y][x-1]++;data[y][x+1]++;
			data[y+1][x]++;data[y+1][x-1]++;data[y+1][x+1]++;
		}else if(size==3){
			data[y-1][x]++;data[y-1][x-1]++;data[y-1][x+1]++;
			data[y][x]++;data[y][x-1]++;data[y][x+1]++;data[y][x-2]++;data[y][x+2]++;
			data[y+1][x]++;data[y+1][x-1]++;data[y+1][x+1]++;
			data[y-2][x]++;data[y+2][x]++;
		}
	}
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			max=std::max(max,data[i][j]);
			if(data[i][j]==0)count++;
		}
	}
	std::cout<<count<<std::endl;
	std::cout<<max<<std::endl;
	return 0;
}