#include<iostream>
using namespace std;
int a[10][10]={0};

void small(int x,int y){
	a[x][y]++;
	if(x!=0)a[x-1][y]++;
	if(x!=9)a[x+1][y]++;
	if(y!=0)a[x][y-1]++;
	if(y!=9)a[x][y+1]++;
}

void middle(int x,int y){
	small(x,y);
	if(x!=0&&y!=0)a[x-1][y-1]++;
	if(x!=9&&y!=0)a[x+1][y-1]++;
	if(x!=0&&y!=9)a[x-1][y+1]++;
	if(x!=9&&y!=9)a[x+1][y+1]++;
}

void large(int x,int y){
	middle(x,y);
	if(x>=2)a[x-2][y]++;
	if(x<=7)a[x+2][y]++;
	if(y>=2)a[x][y-2]++;
	if(y<=7)a[x][y+2]++;
}

int main(){
	
	int x,y,z;
	while(cin>>x>>y>>z){
		if(z==1){small(x,y);}
		if(z==2){middle(x,y);}
		if(z==3){large(x,y);}
	}
	int white=0,koi=0;
	for(int i=0;i<=9;i++){
		for(int j=0;j<=9;j++){
			if(a[i][j]==0)white++;
			if(a[i][j]>koi)koi=a[i][j];
		}
	}
	cout<<white<<endl<<koi;
}