#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

int main(){
  vector <vector <int> > a(13,vector<int>(13,0));
  int c,d,size,o=0;
  char s1,s2;
  while(cin>>c>>s1>>d>>s2>>size){
      c+=2;d+=2;
    if(size==1){
      a[c][d]++;
      a[c][d-1]++;
      a[c-1][d]++;
      a[c+1][d]++;
      a[c][d+1]++;
    }
    if(size==2){
      a[c][d]++;
      a[c][d-1]++;
      a[c-1][d]++;
      a[c+1][d]++;
      a[c][d+1]++;
      a[c-1][d-1]++;
      a[c+1][d+1]++;
      a[c-1][d+1]++;
      a[c+1][d-1]++;
    }
    if(size==3){
      a[c][d]++;
      a[c][d-1]++;
      a[c-1][d]++;
      a[c+1][d]++;
      a[c][d+1]++;
      a[c-1][d-1]++;
      a[c+1][d+1]++;
      a[c-1][d+1]++;
      a[c+1][d-1]++;
      a[c+2][d]++;
      a[c-2][d]++;
      a[c][d+2]++;
      a[c][d-2]++;
    }
  }
  int maxi = 0;
  for(int i = 2; i < 12; i++){
    int d = *max_element(a[i].begin(),a[i].end());
    maxi = max(maxi, d);
    for(int j = 2; j < 12; j++){
      if(a[j][i]==0) o++;
      //cout << a[i][j] << ' ';
    }
    //cout << endl;
  }

 cout<<o<<endl<<maxi<<endl;
}