#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 ) {
    for ( int i = 0; i < 10; i++ ) {
      for ( int j = 0; j < 10; j++ ) {
	field[i][j] = 0;
      }
    }

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

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

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

  }
 
  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 << endl;
  cout << maxv << endl;
  
  return 0;
}