#include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <functional>
#include <complex>
using namespace std;
int main() {
	int paper[14][14] = { 0 };
	int fl, x, y;
	char split;
	while (cin >> y >> split >> x >> split >> fl) {
		if (fl == 2) {
			for (int i = 0;i < 3;i++) {
				for (int j = 0;j < 3;j++) {
					paper[x + 1 + i][y + 1 + j] += 1;
				}
			}
		}
		if (fl == 1) {
			paper[x + 2][y + 2] += 1;
			paper[x + 1][y + 2] += 1;
			paper[x + 2][y + 1] += 1;
			paper[x + 3][y + 1] += 1;
			paper[x + 1][y + 3] += 1;
		}
		if (fl == 3) {
			for (int i = 0;i < 3;i++) {
				for (int j = 0;j < 3;j++) {
					paper[x + 1 + i][y + 1 + j] += 1;
				}
			}
			paper[x][y + 2] += 1;
			paper[x + 4][y + 2] += 1;
			paper[x + 2][y + 4] += 1;
			paper[x + 2][y] += 1;

		}
	}
		int count = 0;
		int ans = 0;
		for (int i = 2;i < 12;i++) {
			for (int j = 2;j < 12;j++) {
				if (paper[i][j] == 0) count += 1;
				ans = max(ans, paper[i][j]);
			}
		}
	cout << count << endl;
	cout << ans << endl;
	return 0;
}