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

using namespace std;

constexpr auto N=10;

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

  int x, y, s;
  while( scanf( "%d,%d,%d", &x, &y, &s ) != EOF ) {
    {
      for( auto const i : inc[s-1] ) {
        auto const px = x + i.first, py = y + i.second;
        if ( px >= 0 && px < N && py >= 0 && py < N )
          ++p[px][py];
      }
    }
  }

  cout
    << count( &p[0][0], &p[0][0]+N*N, 0 ) << endl
    << *max_element( &p[0][0], &p[0][0]+N*N ) << endl;
}