#include<iostream>
#include<algorithm>
using namespace std;
int main(){
  string str;
  int paper[10][10];
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      paper[i][j]=0;
    }
  }
  int I=50;
  while(cin >> str){
    int x,y,s;
    x=str[0]-48;
    y=str[2]-48;
    s=str[4]-48;
    if(s==1){
      paper[x][y]++;
      paper[x+1][y]++;
      paper[x-1][y]++;
      paper[x][y+1]++;
      paper[x][y-1]++;
    }
    else if(s==2){
      paper[x][y]++;
      paper[x][y+1]++;
      paper[x][y-1]++;
      paper[x+1][y]++;
      paper[x+1][y+1]++;
      paper[x+1][y-1]++;
      paper[x-1][y]++;
      paper[x-1][y+1]++;
      paper[x-1][y-1]++;
    }
    else if(s==3){
      paper[x][y-2]++;
      paper[x+1][y-1]++;
      paper[x][y-1]++;
      paper[x-1][y-1]++;
      paper[x-2][y]++;
      paper[x-1][y]++;
      paper[x][y]++;
      paper[x+1][y]++;
      paper[x+2][y]++;
      paper[x-1][y+1]++;
      paper[x][y+1]++;
      paper[x+1][y+1]++;
      paper[x][y+2]++;
    }
    int white=0,koii=0;
    for(int i=0;i<10;i++){
      for(int j=0;j<10;j++){
        if(paper[i][j]==0)white++;
        koii=max(koii,paper[i][j]);
      }
    }
    cout << white << endl << koii << endl;
  }
}