#include<iostream>
using namespace std ;

int map[10][10]={};
int sx[] = { 0,-1,0,1,0 } , sy[] = { -1,0,0,0,1 } ;
int mx[] = { -1,0,1 }, my[] = { -1,0,1 } ;
int lx[] = { 0,-1,0,1,-2,-1,0,1,2,-1,0,1,0 } ;
int ly[] = { -2,-1,-1,-1,0,0,0,0,0,1,1,1,2 } ;

int main(){
	
	int x,y,size ;
	char temp;
	int empty=0,max=0;
	
	while(1){
		cin >> x ;
		if( cin.eof() ) break;
		cin >> temp >> y ;
		cin >> temp >> size ;
		
		if( size==1 ){
			for( int i=0 ; i<5 ; i++ ){
				if( x+sx[i]>=0 && x+sx[i]<=9 && y+sy[i]>=0 && y+sy[i]<=9 )
					map[x+sx[i]][y+sy[i]]++;
			}
		}
		else if( size==2 ){
			for( int i=0 ; i<9 ; i++ ){
				if( x+mx[i%3]>=0 && x+mx[i%3]<=9 && y+my[i/3]>=0 && y+my[i/3]<=9 )
					map[x+mx[i%3]][y+my[i/3]]++;
			}
		}
		else if( size==3 ){
			for( int i=0 ; i<13 ; i++ ){
				if( x+lx[i]>=0 && x+lx[i]<=9 && y+ly[i]>=0 && y+ly[i]<=9 )
					map[x+lx[i]][y+ly[i]]++;
			}
		}
	}
	
	for( int i=0 ; i<10 ; i++ ){
		for( int j=0 ; j<10 ; j++ ){
			if( map[i][j]==0 ) empty++;
			if( map[i][j]>max ) max=map[i][j] ;
		}
	}
	
	cout << empty << endl ;
	cout << max << endl ;
	
return 0;
}