#include<iostream>
int main(){
	int paper[10][10] = {};
	std::pair<int, int>pos;
	int ink;
	char h;
	int max = 0;
	int count = 0;
	while (std::cin >> pos.first >> h >> pos.second >> h >> ink) {
		paper[pos.first][pos.second]++;
		for (int i = 0; i < ink; ++i) {
			if (pos.first - i >= 0 && pos.second - i >= 0)paper[pos.first - i][pos.second - i]++;
			if (pos.first - i >= 0 && pos.second + i <= 9)paper[pos.first - i][pos.second + i]++;
			if (pos.first + i <= 9 && pos.second - i >= 0)paper[pos.first + i][pos.second - i]++;
			if (pos.first + i <= 9 && pos.second + i <= 9)paper[pos.first + i][pos.second + i]++;
		}
		for (int i = 0; i < 10; ++i) {
			for (int j = 0; j < 10; ++j) {
				if (paper[i][j] == 0)++count;
				else if (max < paper[i][j])max = paper[i][j];
			}
		}
	}
		std::cout << count << std::endl;
		std::cout << max << std::endl;
		return 0;
}