#include<stdio.h>
bool rangeCheck(int x,int y){
    if(x >= 0 && x <= 9 && y>=0 && y <= 9)return true;
    else{
        return false;
    }
}
int main(){
	int x,y,s,i,j;
	int p[10][10];
	for(i=0;i<10;i++)
		for(j=0;j<10;j++)
			p[i][j]=0;
	while(~scanf("%d,%d,%d",&x,&y,&s)){
		if(s==1){
			p[x][y]++;            
			if(rangeCheck(x,y-1))p[x][y-1]++;
            if(rangeCheck(x,y+1))p[x][y+1]++;
            if(rangeCheck(x-1,y))p[x-1][y]++;
            if(rangeCheck(x+1,y))p[x+1][y]++;}
		if(s==2){
			p[x][y]++;            
			if(rangeCheck(x-1,y-1))p[x-1][y-1]++;
            if(rangeCheck(x,y-1))p[x][y-1]++;
            if(rangeCheck(x+1,y-1))p[x+1][y-1]++;
            if(rangeCheck(x-1,y))p[x-1][y]++;
            if(rangeCheck(x+1,y))p[x+1][y]++;
            if(rangeCheck(x-1,y+1))p[x-1][y+1]++;
            if(rangeCheck(x,y+1))p[x][y+1]++;
            if(rangeCheck(x+1,y+1))p[x+1][y+1]++;}
		if(s==3){
			p[x][y]++;
		    if(rangeCheck(x-1,y-1))p[x-1][y-1]++;
            if(rangeCheck(x,y-1))p[x][y-1]++;
            if(rangeCheck(x+1,y-1))p[x+1][y-1]++;
            if(rangeCheck(x-1,y))p[x-1][y]++;
            if(rangeCheck(x+1,y))p[x+1][y]++;
            if(rangeCheck(x-1,y+1))p[x-1][y+1]++;
            if(rangeCheck(x,y+1))p[x][y+1]++;
            if(rangeCheck(x+1,y+1))p[x+1][y+1]++;
            if(rangeCheck(x,y-2))p[x][y-2]++;
            if(rangeCheck(x-2,y))p[x-2][y]++;
            if(rangeCheck(x+2,y))p[x+2][y]++;
            if(rangeCheck(x,y+2))p[x][y+2]++;}}
	int max=0,sum=0;
	for(i=0;i<10;i++)
		for(j=0;j<10;j++){
			if(p[i][j]>max)max=p[i][j];
			if(p[i][j]==0)sum++;}
	printf("%d\n%d\n",sum,max);
	return 0;}
