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

int pa[20][20];

int main(void)
{
	int x,y,c;

	while(scanf("%d,%d,%d", &x,&y,&c) != EOF){

		if(c == 1){
			for(int i = -1; i <= 1; i++){
				pa[y][x-i]++;
				pa[y-i][x]++;

			}
			pa[y][x]--;
		}
		else if(c == 2){
			for(int i = -1; i <= 1; i++){
				for(int j = -1; j <= 1; j++)
					pa[y-i][x-j]++;
			}
		}
		else if(c == 3){
			for(int i = -1; i <= 1; i++){
				for(int j = -1; j <= 1; j++)
					pa[y-i][x-j]++;
			}
			pa[y+2][x+2]++;
			pa[y+2][x-2]++;
			pa[y-2][x-2]++;
			pa[y-2][x+2]++;
		}	
	}

	int count = 0, max = 0;

	for(int i = 1; i <= 10; i++){
		for(int j = 1; j <= 10; j++){
			if(pa[i][j] > 0)
				count++;
			if(max < pa[i][j])
				max = pa[i][j];
		}
	}
	count = 100 - count;
	cout << count << endl << max << endl;


	return 0;
}