#include<iostream>
#include<cstdio>
using namespace std;
int main(){
  int field[20][20]={0};
  int x,y,s;
  while(scanf("%d,%d,%d",&x,&y,&s)!=EOF){
    x+=5;
    y+=5;
    if(s>2){
      field[x+2][y]++;
      field[x-2][y]++;
      field[x][y+2]++;
      field[x][y-2]++;
    }
    if(s>1){
      field[x+1][y+1]++;
      field[x+1][y-1]++;
      field[x-1][y+1]++;
      field[x-1][y-1]++;
    }
    field[x][y]++;
    field[x+1][y]++;
    field[x][y+1]++;
    field[x-1][y]++;
    field[x][y-1]++;
  }
  int aans=0,bans=0;
  for(int i=0; i<10; i++){
    for(int j=0; j<10; j++){
      if(field[i+5][j+5] == 0) aans++;
      if(bans<field[i+5][j+5]) bans = field[i+5][j+5];	
    }
  }
  cout <<aans<<endl<<bans<<endl;
  return 0;
}