#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	int bigx[4] = { 0, 2, 0, -2 };
	int bigy[4] = { 2, 0, -2, 0 };
	int smx[4] = {0,1,0,-1};
	int smy[4] = {1,0,-1,0};
	int midx[9] = { -1, -1, 0, 1, 1,  1,  0, -1 };
	int midy[9] = {  0,  1, 1, 1, 0, -1, -1, -1 };
	int map[10][10] = { 0 };
	int cnt = 100;
	int x, y, size;
	char s, d;
	int ma = 0;
	int c = 0;

	while (cin >> x >> s >> y >> d >> size){
		
		if (size == 1){
			map[x][y]++;
			for (int i = 0; i < 4; i++){
				
				int xx = smx[i] + x;
				int yy = smy[i] + y;
				if (xx >= 0 && xx < 10 && y >= 0 && y < 10){
					map[xx][yy]++;
				}
			}
		}

		else if (size == 2){
			map[x][y]++;
			for (int i = 0; i < 8; i++){
				int xx = midx[i] + x;
				int yy = midy[i] + y;
				if (xx >= 0 && xx < 10 && y >= 0 && y < 10){
					map[xx][yy]++;
				}
			}
		}

		else if(size==3) {
			map[x][y]++;
			for (int i = 0; i < 4; i++){
				int xx = bigx[i] + x;
				int yy = bigy[i] + y;
				if (xx >= 0 && xx < 10 && y >= 0 && y < 10){
					map[xx][yy]++;
				}
			}
			for (int i = 0; i < 8; i++){
				int xx = midx[i] + x;
				int yy = midy[i] + y;
				if (xx >= 0 && xx < 10 && y >= 0 && y < 10){
					map[xx][yy]++;
				}
			}
		}
	}
	/*for (int i = 0; i < 10; i++){
		for (int i2 = 0; i2 < 10; i2++){
			cout << map[i][i2] << " ";
			if (map[i][i2] != 0){
				cnt--;
			}
			ma = max(ma, map[i][i2]);
		}cout << endl;
	}*/
	cout << ma << endl;
	cout << cnt << endl;
}