#include<string>
#include<cstdio>
#include<iostream>

using namespace std;

int main(){
	int a[15][15]={0};
	int x,y,s;
	
	while(scanf("%d,%d,%d",&x,&y,&s) != EOF){
		a[x+2][x+2]++;a[x+1][y+2]++;a[x+3][y+2]++;a[x+2][y+1]++;a[x+2][y+3]++;
		if(1<s){a[x+1][y+1]++;a[x+3][y+3]++;a[x+1][y+3]++;a[x+3][y+1]++;}
		if(2<s){a[x][y+2]++;a[x+4][y+2]++;a[x+2][y+2]++;a[x+2][y]++;a[x+2][y+2]++;}
	}
	int br=0,max=0;
	for(int i=2;i<12;i++){
		for(int j=2;j<12;j++){
			if(0==a[i][j])br++;
			if(max<a[i][j])max=a[i][j];
		}
	}
	
        cout<<br<<endl;
        cout<<max<<endl;
}