#include <cstdio>
#include <cstring>

using namespace std;

const int dy[3][13] = {
	{-1,0,0,0,1},
	{-1,-1,-1,0,0,0,1,1,1,},
	{-2,-1,-1,-1,0,0,0,0,0,1,1,1,2}},
		  dx[3][13] = {
	{0,-1,0,1,0},
	{-1,0,1,-1,0,1,-1,0,1},
	{0,-1,0,1,-2,-1,0,1,2,-1,0,1,0}},
	dnum[3] = {5,9,13};


int main(void){
	int p[10][10], x, y, size, i, j, ans1, ans2;
		memset(p,0,sizeof(p));
	while(scanf("%d%*c%d%*c%d",&x,&y,&size) != EOF){
		size--;
		for(i = 0;i < dnum[size];i++){
			if(0 <= y + dy[size][i] && y + dy[size][i] < 10 && 0 <= x + dx[size][i] && x + dx[size][i] < 10){
				p[y + dy[size][i]][x + dx[size][i]]++;
			}
		}
		ans1 = ans2 = 0;
	}
	for(i = 0;i < 10;i++){
		for(j = 0;j < 10;j++){
			if(p[i][j] == 0){
				ans1++;
			}
			if(ans2 < p[i][j]){
				ans2 = p[i][j];
			}
		}
	}
	printf("%d\n%d\n",ans1,ans2);
	return 0;
}