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