#include <bits/stdc++.h>
using namespace std;

int main(){
  vector<vector<int>> A(10, vector<int>(10,0));

  int x, y, s; char c;
  while(cin >> x >> c >> y >> c >> s){
    vector<int> dx, dy;
    if(s == 1){
      dx = {0, 1, 0, -1, 0};
      dy = {0, 0, 1, 0, -1};
    } else if (s == 2){
      dx = {0, 0, 0, 1, 1, 1, -1, -1, -1};
      dy = {0, 1, -1, 0, 1, -1, 0, 1, -1};
    } else {
      dx = {0, 0, 0, 0, 0, 1, 1, 1, -1, -1, -1, 2, -2};
      dy = {0, 1, -1, 2, -2, 0, 1, -1, 0, 1, -1, 0, 0};
    }

    for(int i=0; i<dx.size(); i++){
      int cx = x+dx[i], cy = y+dy[i];
      if(0 <= cx && cx < 10 && 0 <= cy && cy < 10){
        A[cx][cy]++;
      }
    }
  }

  int white = 0, darkest = 0;
  for(int i=0; i<10; i++){
    for(int j=0; j<10; j++){
      darkest = max(darkest, A[i][j]);
      if(A[i][j] == 0) white++;
    }
  }

  cout << white << endl;
  cout << darkest << endl;
}
  
  
