#include<iostream>
using namespace std;
int ink[14][14] = {};

int main() {
	int x, y, s;
	char c;
	while (cin >> x >> c >> y >> c >> s) {
		x += 2; y += 2;
		if (s == 1) {
			ink[y - 1][x]++;
			ink[y][x - 1]++;
			ink[y][x]++;
			ink[y][x + 1]++;
			ink[y + 1][x]++;
		}
		else if (s == 2) {
			ink[y - 1][x - 1]++;
			ink[y - 1][x]++;
			ink[y - 1][x + 1]++;
			ink[y][x - 1]++;
			ink[y][x]++;
			ink[y][x + 1]++;
			ink[y + 1][x - 1]++;
			ink[y + 1][x]++;
			ink[y + 1][x + 1]++;
		}
		else if (s == 3) {
			ink[y - 2][x]++;
			ink[y - 1][x - 1]++;
			ink[y - 1][x]++;
			ink[y - 1][x + 1]++;
			ink[y][x - 2]++;
			ink[y][x - 1]++;
			ink[y][x]++;
			ink[y][x + 1]++;
			ink[y][x + 2]++;
			ink[y + 1][x - 1]++;
			ink[y + 1][x]++;
			ink[y + 1][x + 1]++;
			ink[y + 2][x]++;
		}
	}
	int cnt = 0, max = 0;
	for (int i = 2; i < 12; i++) {
		for (int j = 2; j < 12; j++) {
			if (ink[i][j]) cnt++;
			if (ink[i][j] > max) max = ink[i][j];
		}
	}
	cout << 100 - cnt << endl << max << endl;
}
