#include<iostream>

using namespace std;

bool check(int x, int y) {
	if (x >= 0 && x <= 9 && y >= 0 && y <= 9) {
		return true;
	}
	else {
		return false;
	}
}


int main() {
	int paper[10][10] = { 0 };
	int x, y, s;
	char d, h;
	while (cin >> x >> d >> y >> h >> s) {
		if (check(x, y)) {
			paper[x][y] += 1;
		}
		if (check(x - 1, y)) {
			paper[x - 1][y] += 1;
		}
		if (check(x + 1, y)) {
			paper[x + 1][y] += 1;
		}
		if (check(x, y - 1)) {
			paper[x][y - 1] += 1;
		}
		if (check(x, y + 1)) {
			paper[x][y + 1] += 1;
		}

		if (s != 1) {
			if (check(x-1,y-1)) {
				paper[x - 1][y - 1] += 1;
			}
			if (check(x - 1, y + 1)) {
				paper[x - 1][y + 1] += 1;
			}
			if (check(x + 1, y - 1)) {
				paper[x + 1][y - 1] += 1;
			}
			if (check(x + 1, y + 1)) {
				paper[x + 1][y + 1] += 1;
			}
		}

		if (s == 3) {
			if (check(x - 2, y)) {
				paper[x - 2][y] += 1;
			}
			if (check(x, y - 2)) {
				paper[x][y - 2] += 1;
			}
			if (check(x + 2, y)) {
				paper[x + 2][y] += 1;
			}
			if (check(x, y + 2)) {
				paper[x][y + 2] += 1;
			}

		}

	

	}
	int max = 0, blank = 0;
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 10; j++) {
			if (paper[i][j] == 0) {
				blank += 1;
			}
			else {
				if (paper[i][j] > max) {
					max = paper[i][j];
				}
			}
		}
	}
	cout << blank << endl;
	cout << max << endl;

}
