#include <iostream>
#include <string>
#include <cstdlib>
using namespace std;

int main() {
  int xi,yi,size,xy[10][10] = {0};
  int white,top;
  string str;
  while(cin >> str) {
    xi = atoi(str.substr(0,1).c_str());
    yi = atoi(str.substr(2,1).c_str());
    size = atoi(str.substr(4,1).c_str());
    if((size == 1) ||(size == 2)||(size == 3)) {
      xy[xi][yi]++;
      xy[xi+1][yi]++;
      xy[xi-1][yi]++;
      xy[xi][yi+1]++;
      xy[xi][yi-1]++;
    }
    if((size == 2) || (size == 3)) {
      xy[xi+1][yi+1]++;
      xy[xi+1][yi-1]++;
      xy[xi-1][yi+1]++;
      xy[xi-1][yi-1]++;
    }
    if(size == 3) {
      xy[xi][yi+2]++;
      xy[xi][yi-2]++;
      xy[xi+2][yi]++;
      xy[xi-2][yi]++;
    }
  }
  white = 0;
  top = xy[0][0];
  for(int i=0;i<10;i++) {
    for(int j=0;j<10;j++) {
      if(xy[i][j] == 0)
        white++;
      if(xy[i][j] > top)
        top = xy[i][j];
    }
  }
  cout << white << endl << top << endl;
}