#include <iostream>
#include <cstring>
#include <cstdio>

using namespace std;

int main(void){
  int i,j;
  int field[16][16]={0};
  int x,y;
  int size;
  int max=0;
  int none=0;

  while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
    if(size>=1){
      field[x+2][y+2]++;
      field[x+1][y+2]++;
      field[x+3][y+2]++;
      field[x+2][y+1]++;
      field[x+2][y+3]++;
    }
    if(size>=2){
      field[x+1][y+1]++;
      field[x+1][y+3]++;
      field[x+3][y+1]++;
      field[x+3][y+3]++;
    }
    if(size>=3){
      field[x+2][y]++;
      field[x+2][y+4]++;
      field[x][y+2]++;
      field[x+4][y+2]++;
    }
  }

  for(i=2;i<12;i++){
    for(j=2;j<12;j++){
      if(field[i][j]>max){
	max=field[i][j];
      }
      if(field[i][j]==0){
	none++;
      }
    }
  }

  cout<<none<<endl;
  cout<<max<<endl;

  return(0);
}