#include <stdio.h>
#include <math.h>
#include <iostream>

using namespace std;

int main() {

	int hyou[14][14] = {0};

	int a,b,c;
	int counter1 = 0;
	int counter2 = 0;
	char d;

	while (cin >> a >> d >> b >> d >> c) {
		a += 2;
		b += 2;
		if (c == 1) {
			hyou[a][b] += 1;
			hyou[a - 1][b] += 1;
			hyou[a + 1][b] += 1;
			hyou[a][b - 1] += 1;
			hyou[a][b + 1] += 1;
		} else if(c == 2) {
			for (int i = a - 1; i < a + 2; i++) {
				for (int j = b - 1; j < b + 2; j++) {
					hyou[i][j] += 1;
				}
			}
		} else {
			for (int i = a - 1; i < a + 2; i++) {
				for (int j = b - 1; j < b + 2; j++) {
					hyou[i][j] += 1;
				}
			}
			hyou[a - 2][b] += 1;
			hyou[a + 2][b] += 1;
			hyou[a][b - 2] += 1;
			hyou[a][b + 2] += 1;
		}
	}

	for (int i = 2; i < 12; i++) {
		for (int j = 2; j < 12; j++) {
			if (hyou[i][j] == 0) {
				counter1++;
			}
			counter2 = max(counter2,hyou[i][j]);
		}
	}

	cout << counter1 << endl << counter2 << endl;

	return 0;
}