#include<iostream>
#include<algorithm>
using namespace std;
int x[2000][2000], a, b, c, sum, maxn; char f;
int main() {
	while (cin >> a >> f >> b >> f >> c) {
		for (int i = -c; i <= c; i++) {
			for (int j = -c; j <= c; j++) {
				if (a + i >= 0 && b + j >= 0) {
					if (i + j >= -c && i + j <= c) {
						x[a + i][b + j]++;
					}
				}
			}
		}
	}
	sum = 0;
	maxn = 0;
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 10; j++) {
			if (x[i][j] == 0) { sum++; }
			maxn = max(maxn, x[i][j]);
		}
	}
	cout << sum << endl << maxn << endl;
}