#include<iostream>
using namespace std;
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
int main(){
	int map[11][11]={0};
	char c;
	int a,b,s;
	while(cin>>a>>c>>b>>c>>s){
		switch(s){
			case 3:
				map[a][b+2]++;
				map[a][b-2]++;
				map[a+2][b]++;
				map[a-2][b]++;
			case 2:
				map[a+1][b+1]++;
				map[a+1][b-1]++;
				map[a-1][b+1]++;
				map[a-1][b-1]++;
			case 1:
				map[a][b]++;
				map[a][b+1]++;
				map[a][b-1]++;
				map[a+1][b]++;
				map[a-1][b]++;
		}
	}
	
	int max=0;
	int count=0;
	rep(i,10){
		rep(j,10){
			if(max<map[i][j])max=map[i][j];
			if(0==map[i][j])count++;
		}
	}
	cout<<count<<endl;
	cout<<max<<endl;
	
}