#include<stdio.h>

static int map[11][11];

void small(int x,int y){
	map[y][x]+=1;
	map[y][x+1]+=1;
	map[y][x-1]+=1;
	map[y+1][x]+=1;
	map[y-1][x]+=1;
}

void midium(int x,int y){
	small(x,y);
	map[y+1][x+1]+=1;
	map[y-1][x-1]+=1;
	map[y-1][x+1]+=1;
	map[y+1][x-1]+=1;
}

void big(int x,int y){
	medium(x,y);
	map[y][x+2]+=1;
	map[y][x-2]+=1;
	map[y+2][x]+=1;
	map[y-2][x]+=1;
}


int main(){
	int x[1000],y[1000],select[1000];
	int i,j;
	int space=0,max=0;
	
	for(i=0;i<11;i++){
		for(j=0;j<11;j++)map[i][j]=0;
	}
	
	i=0;
	while(scanf("%d,%d,%d",&x[i],&y[i],&select[i])!=EOF){
		switch(select[i]){
		case 1:
			small(x[i]+1,y[i]+1);
			break;
		case 2:
			medium(x[i]+1,y[i]+1);
			break;
		case 3:
			big(x[i]+1,y[i]+1);
			break;
		}
		i++;
	}
	
	for(i=1;i<11;i++){
		for(j=1;j<11;j++){
			if(map[i][j]==0)space++;
			if(max<map[i][j])max=map[i][j];
		}
	}
	
	printf("%d\n%d\n",space,max);
	
	return 0;
}