#include <iostream>
using namespace std;

int ds[3] = {4,9,13};
int dx[13] = { 0,-1, 0, 1, 0,-1, 1,-1, 1, 0,-2, 2, 0};
int dy[13] = {-1, 0, 0, 0, 1,-1,-1, 1, 1,-2, 0, 0, 2};

int main() {

  int x,y,size;
  char c;
  int map[14][14] = {0};

  int cnt = 0;
  int map_max = 0;

  while( cin >> x >> c >> y >> c >> size ) {

    for ( int i = 0; i < ds[size-1]; i++ ) {

      map[ x+2 + dx[i] ][ y+2 + dy[i] ]++;

    }

  }

  for ( int i = 2; i < 12; i++ ) {
    for ( int j = 2; j < 12; j++ ) {
      
      if ( map[i][j] == 0 ) cnt++;
      map_max = max( map_max, map[i][j] );
      
    }
  }

  cout << cnt << endl << map_max << endl;

  return 0;

}