#include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#include<cstdio>
#include<climits>
#include<cmath>
#include<cstring>
#include<string>
#include<complex>
#include<iomanip>
 
#define EPS (1e-10)
using namespace std;
#define PI (3.1415926535)
 
void c(int x, int y, int p[][10]){
	if(x >= 0 && x < 10){
		if(y >= 0 && y < 10){
			p[x][y]++;
		}
	}
}

int main(){
	int p[10][10] = {0};

	int x, y, size;

	while(scanf("%d,%d,%d", &x, &y, &size) != EOF){
		switch(size){
		case 1:
			for(int i = x-1; i <= x+1; i++){
				for(int j = y-1; j <= y+1; j++){
					int d = abs(i-x) + abs(j-y);
					if(d <= 1){
						c(i, j, p);
					}
				}
			}
			break;
		case 2:
			for(int i = x-1; i <= x+1; i++){
				for(int j = y-1; j <= y+1; j++){
					c(i, j, p);
				}
			}
			break;
		case 3:
			for(int i = x-2; i <= x+2; i++){
				for(int j = y-2; j <= y+2; j++){
					int d = abs(i-x) + abs(j-y);
					if(d <= 2){
						c(i, j, p);
					}
				}
			}			
		}
		//for(int i = 0; i < 10; i++){
		//	for(int j = 0; j < 10; j++){
		//		cout << p[j][i];
		//	}
		//	cout << endl;
		//}
	}

	int max = 0;
	int count = 0;
	for(int i = 0; i < 10; i++){
		for(int j = 0; j < 10; j++){
			if(p[i][j] > max){
				max = p[i][j];
			}
			if(p[i][j] == 0){
				count++;
			}
		}
	}

	cout << count << endl;
	cout << max << endl;

	return 0;
}