#include <iostream>
#include <algorithm>
using namespace std;

int paper[10][10];

int drop[3][5][5]  = {
  {
  {0, 0, 0, 0, 0},
  {0, 0, 1, 0, 0},
  {0, 1, 1, 1, 0},
  {0, 0, 1, 0, 0},
  {0, 0, 0, 0, 0},
  },
  {
  {0, 0, 0, 0, 0},
  {0, 1, 1, 1, 0},
  {0, 1, 1, 1, 0},
  {0, 1, 1, 1, 0},
  {0, 0, 0, 0, 0},
  },
  {
  {0, 0, 1, 0, 0},
  {0, 1, 1, 1, 0},
  {1, 1, 1, 1, 1},
  {0, 1, 1, 1, 0},
  {0, 0, 1, 0, 0},
  },
};

int main()
{
  fill((int*) paper, (int*) paper+100, 0);
  int x, y, size;
  char d;
  while (cin >> x >> d >> y >> d >> size) {
    for (int dx = -2; dx <= 2; dx++) {
      for (int dy = -2; dy <= 2; dy++) {
        if (x + dx >= 0 && x + dx < 10 && y + dy >= 0 && y + dy < 10)
          paper[x + dx][y + dy] += drop[size - 1][2+dx][2+dy];
      }
    }
  }
  int max_drop = 0;
  int space = 0;
  for (int i = 0; i < 10; ++i) {
    for (int j = 0; j < 10; ++j) {
      if (paper[i][j] == 0) space++;
      max_drop = max(max_drop, paper[i][j]);
    }
  }
  cout << space << endl << max_drop << endl;
}