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

int field[10][10];

int main() {
  int x,y,size; 
  char ch;
  while ( cin >> x >> ch >> y >> ch >> size ) {

    if ( x-1 >= 0 ) field[x-1][y]++;
    if ( x+1 < 10 ) field[x+1][y]++;
    if ( y-1 >= 0 ) field[x][y-1]++;
    if ( y+1 < 10 ) field[x][y+1]++;

    if ( size == 2 ) {
      if ( x+1 < 10 && y+1 < 10 ) field[x+1][y+1]++;
      if ( x-1 >= 0 && y+1 < 10 ) field[x-1][y+1]++;
      if ( x+1 < 10 && y-1 >= 0 ) field[x+1][y-1]++;
      if ( x-1 >= 0 && y-1 >= 0 ) field[x-1][y-1]++;
    } 

    if ( size == 3 ) {
      if ( x+2 < 10 ) field[x+2][y]++;
      if ( x-2 >= 0 ) field[x-2][y]++;
      if ( y+2 < 10 ) field[x][y+2]++;
      if ( y-2 >= 0 ) field[x][y-2]++;
    }

  }

  int cnt = 0,maxv = 0;

  for ( int i = 0; i < 10; i++ ) {
    for ( int j = 0; j < 10; j++ ) {
      if ( field[i][j] == 0 ) cnt++;
      maxv = max(maxv,field[i][j]);
    }
  }

  cout << cnt-1 << endl;
  cout << maxv << endl;
  
  return 0;
}