#include<stdio.h>
int main(void)
{
	int p[11][11];
	int x,y,z;
	int i,j;
	int max,cnt;
	max=0;
	cnt=0;
	
	for(i=0;i<10;i++){
		for(j=0;j<10;j++){
			p[i][j]=0;
		}
	}
	while(scanf("%d,%d,%d",&x,&y,&z)!=EOF){
		p[x][y]++;
		p[x+1][y]++;
		p[x-1][y]++;
		p[x][y+1]++;
		p[x][y-1]++;
		if(z==2){
			p[x+1][y+1]++;
			p[x+1][y-1]++;
			p[x-1][y+1]++;
			p[x-1][y-1]++;
		}
		else if(z==3){
			p[x+1][y+1]++;
			p[x+1][y-1]++;
			p[x-1][y+1]++;
			p[x-1][y-1]++;
			p[x+2][y]++;
			p[x-2][y]++;
			p[x][y+2]++;
			p[x][y-2]++;
		}
	}
	for(i=0;i<10;i++){
		for(j=0;j<10;j++){
			if(p[i][j]==0){
				cnt++;
			}
			else if(max<p[i][j]){
				max=p[i][j];
			}
		}
	}
	printf("%d\n%d\n",cnt,max);
	return 0;
}