#include<iostream>
using namespace std;

void function(int board[14][14],int x,int y,int n){


	if(n == 1){
		board[x-1][y]++;
		board[x+1][y]++;
		board[x][y]++;
		board[x][y-1]++;
		board[x][y+1]++;
	}

	else if (n == 2){
		for(int i=-1;i<2;i++){
			for(int  j = -1;j<2;j++){
				board[x+i][y+j]++;
			}
		}
	}

	else{
		for(int i=-1;i<2;i++){
			for(int  j = -1;j<2;j++){
				board[x+i][y+j]++;
			}
		}
		board[x+2][y]++;
		board[x-2][y]++;
		board[x][y-2]++;
		board[x][y+2]++;
	}
}

int main(){

	int board[14][14];
	int max=0;
	int sum=0;

	for(int i=0;i<14;i++){
		for(int j=0;j<14;j++){
			board[i][j] = 0;
		}
	}

	char str[10];

	while(cin>>str){
		/*
		if(str[0]=='a'){
			break;
		}
		*/

		function(board,(int)(str[0]-'0'+2),(int)(str[2]-'0'+2),(int)(str[4]-'0'));

	}

	for(int i=2;i<12;i++){
		for(int j=2;j<12;j++){
			if(board[i][j]==0){
				sum++;
			}
			if(max<=board[i][j]){
				max = board[i][j];
			}
		}
	}
	/*
	for(int i=0;i<14;i++){
		for(int j=0;j<14;j++){
			printf("%d ",board[i][j]);
		}
		printf("\n");
	}
	*/

	cout<<sum<<endl;
	cout<<max<<endl;

	return 0;
}