#include<iostream>
using namespace std;
void big(int x,int y,int a[10][10]);
void middle(int x,int y,int a[10][10]);
void small(int x,int y,int a[10][10]);
int main(){
	int a[10][10]={0};
	int x,y,s;
	char c;
	int cnt=0,max=0;
	while(cin>>x>>c>>y>>c>>s){
	if(s==3)big(x,y,a);
	else if(s==2)middle(x,y,a);
	else if(s==1)small(x,y,a);
	
	}
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(a[i][j]==0)cnt++;
			if(a[i][j]>max)max=a[i][j];
			//cout<<a[i][j]<<" ";
		}
		//cout<<endl;
	}
	cout<<cnt<<endl<<max<<endl;
}

void big(int x,int y,int a[10][10]){
	a[x][y]++;
	a[x-2][y]++;a[x][y-2]++;
	a[x-1][y]++;a[x][y-1]++;
	a[x+1][y]++;a[x][y+1]++;
	a[x+2][y]++;a[x][y+2]++;	
	a[x+1][y+1]++;a[x-1][y-1]++;
	a[x+1][y-1]++;a[x-1][y+1]++;
	return ;
}

void middle(int x,int y,int a[10][10]){
	a[x][y]++;
	a[x+1][y]++;a[x][y+1]++;
	a[x-1][y]++;a[x][y-1]++;
	a[x+1][y+1]++;a[x-1][y-1]++;
	a[x+1][y-1]++;a[x-1][y+1]++;
}
void small(int x,int y,int a[10][10]){
	a[x][y]++;
	a[x+1][y]++;a[x][y+1]++;
	a[x-1][y]++;a[x][y-1]++;
}