#include <cstdio>
#include <iostream>
#include <algorithm>
#include <vector>

using namespace std;

constexpr auto N=10;

int main()
{
  int p[N*N]={};
  vector<int> inc[] = {
    { -N, -1, 0, 1, N },
    { -N-1, -N, -N+1, -1, 0, 1, N-1, N, N+1 },
    { -N-N, -N-1, -N, -N+1, -2, -1, 0, 1, 2, N-1, N, N+1, N+N }
  };

  int x, y, s;
  while( scanf( "%d,%d,%d", &x, &y, &s ) != EOF ) {
    {
      auto const base = y*N+x;
      for( auto const i : inc[s-1] ) {
        if ( base+i >= 0 && base+i < N*N )
          ++p[base+i];
      }
    };
  }
  cout
    << count( p, p+N*N, 0 ) << endl
    << *max_element( p, p+N*N ) << endl;
}