#include<iostream>
#include<stdio.h>
using namespace std;

int small[3][3] = {0, 1, 0,
		   1, 1, 1,
		   0, 1, 0};
int normal[3][3] = {1, 1, 1,
		    1, 1, 1,
		    1, 1, 1};
int big[5][5] = {0, 0, 1, 0, 0,
		 0, 1, 1, 1, 0,
		 1, 1, 1, 1, 1,
		 0, 1, 1, 1, 0,
		 0, 0, 1, 0, 0};

int map[10][10];
int x, y, size;
int white = 0;
int black = 0;

int main(){
	while(scanf("%d,%d,%d", &x, &y, &size) != EOF){
		switch(size){
			case 1:
				for(int i = 0; i < 3; i++){
					for(int j = 0; j < 3; j++){
						if(0 <= x-1+i && x-1+i < 10 && 0 <= y-1+j && y-1+j < 10)
							map[x-1+i][y-1+j] += small[i][j];
					}
				}
				break;
			case 2:
				for(int i =0; i < 3; i++){
					for(int j=0; j < 3; j++){
						if(0 <= x-1+i && x-1+i < 10 && 0 <= y-1+j && y-1+j < 10)
							map[x-1+i][y-1+j] += normal[i][j];
					}
				}
				break;
			case 3:
				for(int i=0; i < 5; i++){
					for(int j=0; j < 5; j++){
						if(0 <= x-1+i && x-1+i < 10 && 0 <= y-1+j && y-1+j < 10)
							map[x-2+i][y-2+j] += big[i][j];
					}
				}
				break;
		}
	}
	for(int i=0; i < 10; i++){
		for(int j=0; j < 10; j++){
			if(map[i][j] == 0) white++;
			black = max(black, map[i][j]);
		}
	}

	cout << white << endl;
	cout << black << endl;

}