#include<iostream>
#include<cstdio>
using namespace std;
#define int long long
signed main(){
	int x,y,t;
	int m[14][14];
	while( scanf("%lld,%lld,%lld", &x, &y, &t) != EOF ){
		x+=2;
		y+=2;
		switch(t){
			case 3:
				m[y-2][x]++;
				m[y+2][x]++;
				m[y][x-2]++;
				m[y][x+2]++;
			case 2:
				m[y-1][x-1]++;
				m[y-1][x+1]++;
				m[y+1][x-1]++;
				m[y+1][x+1]++;
			case 1:
				m[y-1][x]++;
				m[y+1][x]++;
				m[y][x-1]++;
				m[y][x+1]++;
				m[y][x]++;
				break;
			default:
				break;
		}
	}
	int z=0;
	int max = -1;
	for(int i=2;i<12;i++){
		for(int j=2;j<12;j++){
			if(m[i][j]==0) z++;
			if(m[i][j]>max) max = m[i][j];
		}
	}
	cout << z << endl;
	cout << max << endl;
	return 0;
}