#include<iostream>
#include<cstdio>
using namespace std;
int main(){
  int field[15][15] = {0};
  for(;;){
    int x,y,s;
    if(scanf("%d,%d,%d",&x,&y,&s) == EOF) break;
    field[x+2][y+2]++;
    field[x+1][y+2]++;
    field[x+2][y+1]++;
    field[x+3][y+2]++;
    field[x+2][y+3]++;
    if(s>1){
      field[x+1][y+1]++;
      field[x+3][y+3]++;
      field[x+1][y+3]++;
      field[x+3][y+1]++;
    }
    if(s>2){
      field[x][y+2]++;
      field[x+2][y]++;
      field[x+4][y+2]++;
      field[x+2][y+4]++;
    }
  }
  int ans[2] = {0};
  for(int i=2; i<12; i++){
    for(int j=2; j<12;j++){
      if(field[i][j] == 0) ans[0]++;
      if(ans[1]<field[i][j]) ans[1] = field[i][j];
    }
  }
  cout <<ans[0]<<endl<<ans[1]<<endl;
  return 0;
}