#include <iostream>
#include<algorithm>
using namespace std;
int map[11][11];
int dx[] = { 0, 0, 0, 1, -1, 1, 1, -1, -1, 0, 0, 2, -2 };
int dy[] = { 0, 1, -1, 0, 0, -1, 1, 1, -1, 2, -2, 0, 0 };
int ma;

int main(){
	int x, y, size;
	char c;
	while (cin >> x >> c >> y >> c >> size){
		for (int i = 0; i < size * 4 + 1; i++){
			int xx = x + dx[i];
			int yy = y + dy[i];
			if (xx < 0 || xx >= 10 || yy < 0 || yy >= 10) continue;
			map[yy][xx]++;
			ma = max(ma, map[yy][xx]);
		}
	}
	int cnt = 0;
	for (int i = 1; i <= 10; i++){
		for (int i2 = 1; i2 <= 10; i2++){
			if (map[i][i2] == 0){
				cnt++;
			}
		}
	}
	cout << cnt << endl;
	cout <<ma << endl;
	return 0;
}