#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int char_to_int(char c) {
	if (c == '0')return 0;
	else if (c == '1')return 1;
	else if (c == '2')return 2;
	else if (c == '3')return 3;
	else if (c == '4')return 4;
	else if (c == '5')return 5;
	else if (c == '6')return 6;
	else if (c == '7')return 7;
	else if (c == '8')return 8;
	else if (c == '9')return 9;
}
int main(){
	string str;
	int p[10][10] = { 0 };
	while (cin >> str){
		int a = char_to_int(str[0]);
		int b = char_to_int(str[2]);
		int s = char_to_int(str[4]);
		p[a][b]++;
		if (s >= 1){
			p[a - 1][b]++;
			p[a + 1][b]++;
			p[a][b - 1]++;
			p[a][b + 1]++;
			if (s >= 2) {
				p[a - 1][b + 1]++;
				p[a + 1][b - 1]++;
				p[a - 1][b - 1]++;
				p[a + 1][b + 1]++;
				if (s >= 3) {
					p[a - 2][b]++;
					p[a + 2][b]++;
					p[a][b - 2]++;
					p[a][b + 2]++;
				}
			}
		}
	}
	int sum = 0;
	int dr = 0;
	for (int i = 0; i < 10; i++){
		for (int j = 0; j < 10; j++) {
			if (p[i][j] == 0)sum++;
			dr = max(dr, p[i][j]);
		}
	}
	cout << sum << endl << dr << endl;
}