#include<cstdio>
#include<algorithm>
using namespace std;
int main(){
	int x, y, s;
	int chess[14][14]={0};
	while(scanf("%d,%d,%d", &x, &y, &s)!=EOF){
		x=x+2;
		y=y+2;
		if(s==1){
			chess[x][y]++;
			chess[x+1][y]++;
			chess[x-1][y]++;
			chess[x][y+1]++;
			chess[x][y-1]++;
		}
		else if(s==2){
			for(int i=x-1; i<=x+1; i++){
				for(int j=y-1; j<=y+1; j++)
					chess[i][j]++;
			}
		}
		else if(s==3){
			for(int i=x-1; i<=x+1; i++){
				for(int j=y-1; j<=y+1; j++)
					chess[i][j]++;
			}
			chess[x][y-2]++;
			chess[x][y+2]++;
			chess[x+2][y]++;
			chess[x-2][y]++;
		}
	}
	int c=0, m=0;
	for(int i=2; i<12; i++){
		for(int j=2; j<12; j++){
			if(chess[i][j]==0)
				c++;
			else{
				m=max(m, chess[i][j]);
			}
		}
	}
	printf("%d\n%d\n", c, m);
	return 0;
}
