#include<iostream>

using namespace std;


main(){
  
  int map[10][10];
  int x,y,size;
  //initialize
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      map[i][j]=0;
    }
  }
  int white=0,Max=0;
  while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
    
    if(size==1){
      map[x][y-1]++;    
      map[x-1][y]++;map[x][y]++;map[x+1][y]++;
                    map[x][y+1]++;
      
    }
    if(size==2){
      map[x-1][y-1]++;map[x][y-1]++;map[x+1][y-1]++;
      map[x-1][y]++;  map[x][y]++;  map[x+1][y]++;
      map[x-1][y+1]++;map[x][y+1]++;map[x+1][y+1]++;
      
    }
    if(size==3){                      map[x][y-2]++;
                      map[x-1][y-1]++;map[x][y-1]++;map[x+1][y-1]++;
      map[x-2][y]++;  map[x-1][y]++;  map[x][y]++;  map[x+1][y]++; map[x+2][y]++;
                      map[x-1][y+1]++;map[x][y+1]++;map[x+1][y+1]++;
                                      map[x][y+2]++;
    }
    
    
  }

    for(int i=0;i<10;i++){
      for(int j=0;j<10;j++){
	if(map[i][j]==0)white++;
	if(map[i][j]>Max)Max=map[i][j];
      }
      
    }
  cout << white<<" "<< Max << endl;

  return 0;
}