#include <iostream>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
using namespace std;

int main(){
	int paper[14][14] = {};
	int x,y,s;
	char s1,s2;
	while(cin >> x >> s1 >> y >> s2 >> s){
		x += 2;
		y += 2;
		if(s == 1){
			paper[x][y - 1]++;
			paper[x - 1][y]++;
			paper[x][y]++;
			paper[x + 1][y]++;
			paper[x][y + 1]++;
		}else if(s == 2){
			for(int i = - 1; i <= 1; i++){
				for(int j = - 1; j <= 1; j++){
					paper[x + i][y + j]++;
				}
			}
		}else if(s == 3){
			for(int i = - 1; i <= 1; i++){
				for(int j = - 1; j <= 1; j++){
					paper[x + i][y + j]++;
				}
			}
			paper[x][y - 2]++;
			paper[x - 2][y]++;
			paper[x + 2][y]++;
			paper[x][y + 2]++;
		}
	}
	int white = 0, max = 0;
	for(int i = 2; i < 12; i++){
		for(int j = 2; j < 12; j++){
			if(paper[i][j] == 0){
				white++;
			}
			if(paper[i][j] > max){
				max = paper[i][j];
			}
		}
	}
	cout << white << endl << max << endl;
}
