#include <iostream>

using namespace std;

inline bool valid(int y, int x) {
    return (0 <= y && y < 10 && 0 <= x && x < 10);
}

int main() {
	int paper[10][10] = {};
	int x, y, siz;
	char c;
	while (cin >> x >> c >> y >> c >> siz) {
		switch (siz) {
			case 3:
				if (valid(y-2, x)) paper[y-2][x] ++;
				if (valid(y, x-2)) paper[y][x-2] ++;
				if (valid(y, x+2)) paper[y][x+2] ++;
				if (valid(y+2, x)) paper[y+2][x] ++;
			case 2:
				if (valid(y-1, x-1)) paper[y-1][x-1] ++;
				if (valid(y-1, x+1)) paper[y-1][x+1] ++;
				if (valid(y+1, x-1)) paper[y+1][x-1] ++;
				if (valid(y+1, x+1)) paper[y+1][x+1] ++;
			case 1:
				if (valid(y-1, x)) paper[y-1][x] ++;
				if (valid(y, x-1)) paper[y][x-1] ++;
				if (valid(y,   x))   paper[y][x] ++;
				if (valid(y, x+1)) paper[y][x+1] ++;
				if (valid(y+1, x)) paper[y+1][x] ++;
		}
	}
	int empty = 0, mx = 0;
	for (int i=0; i<10; ++i) {
		for (int j=0; j<10; ++j) {
			empty += !paper[i][j];
			mx = max(mx, paper[i][j]);
		}
	}
	cout << empty << endl;
	cout << mx << endl;

	return 0;
}