#include <iostream>
#include <cstdio>

using namespace std;

#define XAXIS 10
#define YAXIS 10

int main(){
	int paper[XAXIS][YAXIS];
	int x,y,s;
	int white = 0, max=0;

	//initialize
	for(int i=0; i<XAXIS; i++)
	for(int j=0; j<YAXIS; j++)
		paper[i][j] = 0;

	while(scanf("%d,%d,%d", &x, &y, &s) != EOF){
		paper[x][y] += 1;
		switch(s){
			case 3:
				if(x+2 <  XAXIS) paper[x+2][y] += 1; //2 right 
				if(y+2 <  YAXIS) paper[x][y+2] += 1; //2 down
				if(x-2 >= 0)     paper[x-2][y] += 1; //2 left
				if(y-2 >= 0)     paper[x][y-2] += 1; //2 up

			case 2:
				if(x+1 <  XAXIS && y+1 < YAXIS )  paper[x+1][y+1] += 1; //right upper
				if(x+1 <  XAXIS && y-1 > 0)       paper[x+1][y-1] += 1; //right downer
				if(x-1 >= 0     && y+1 < YAXIS )  paper[x-1][y+1] += 1; //left upper
				if(x-1 >= 0     && y-1 < 0)       paper[x-1][y-1] += 1; //left downer

			case 1:
				if(x+1 <  XAXIS) paper[x+1][y] += 1; //right
				if(y+1 <  YAXIS) paper[x][y+1] += 1; //down
				if(x-1 >= 0)     paper[x-1][y] += 1; //left
				if(y-1 >= 0)     paper[x][y-1] += 1; //up
			default:
				break;
		}
	}

	for(int i=0; i<XAXIS; i++){
		for(int j=0; j<YAXIS; j++){
			if(paper[i][j] == 0 )  white++;
			if(max < paper[i][j] ) max = paper[i][j];
		}
	}

	cout<<white<<endl;
	cout<<max<<endl;
	return 0;
}