#include<iostream>
#include<cstring>
using namespace std;

int main(void){
	int map[10][10];
	int x,y,s;
	int n=0,m=0;
	memset(map,0,sizeof(map));
	while(~scanf("%d,%d,%d",&x,&y,&s)){
		if(s>=1){
			map[x][y]+=1;
			if(x-1>=0 && x-1<10)map[x-1][y]+=1;
			if(x+1>=0 && x+1<10)map[x+1][y]+=1;
			if(y-1>=0 && y-1<10)map[x][y-1]+=1;
			if(y+1>=0 && y+1<10)map[x][y+1]+=1;
		}
		if(s>=2){
			if(x-1>=0 && x-1<10 && y-1>=0 && y-1<10)map[x-1][y-1]+=1;
			if(x+1>=0 && x+1<10 && y-1>=0 && y-1<10)map[x+1][y-1]+=1;
			if(x-1>=0 && x-1<10 && y+1>=0 && y+1<10)map[x-1][y+1]+=1;
			if(x+1>=0 && x+1<10 && y+1>=0 && y+1<10)map[x+1][y+1]+=1;
		}
		if(s>=3){
			if(y-2>=0 && y-2<10)map[x][y-2]+=1;
			if(y+2>=0 && y+2<10)map[x][y+2]+=1;
			if(x-2>=0 && x-2<10)map[x-2][y]+=1;
			if(x+2>=0 && x+2<10)map[x+2][y]+=1;
		}
	}
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(map[i][j]==0)n++;
			if(map[i][j]>m)m=map[i][j];
		}
	}
	printf("%d\n",n);
	printf("%d\n",m);
    return 0;
}