#include <cstdio>
using namespace std;

int main() {
  int x, y, s;
  int nd[] = {5, 9, 13};
  int smallX[] = {0, -1, 0, 1, 0};
  int smallY[] = {-1, 0, 0, 0, 1};
  int mediumX[] = {-1, 0, 1, -1, 0, 1, -1, 0, 1};
  int mediumY[] = {-1, -1, -1, 0, 0, 0, 1, 1, 1};
  int largeX[] = {0, -1, 0, 1, -2, -1, 0, 1, 2, -1, 0, 1, 0};
  int largeY[] = {-2, -1, -1, -1, 0, 0, 0, 0, 0, 1, 1, 1, 2};
  int *dropX[3] = {smallX, mediumX, largeX};
  int *dropY[3] = {smallY, mediumY, largeY};
  int paper[10][10];
  int dx, dy;
  int count;
  int max;

  for (int i=0; i<10; i++) {
    for (int j=0; j<10; j++) {
      paper[i][j] = 0;
    }
  }

  while (scanf("%d,%d,%d", &x, &y, &s) == 3) {
    --s;
    for (int i=0; i<nd[s]; i++) {
      dx = x + dropX[s][i];
      dy = y + dropY[s][i];
      if (dx>=0 && dx<10 && dy>=0 && dy<10) ++paper[dx][dy];
    }
  }

  count = 0;
  max = 0;
  for (int i=0; i<10; i++) {
    for (int j=0; j<10; j++) {
      if (!paper[i][j]) count++;
      if (paper[i][j] > max) max = paper[i][j];
    }
  }
  printf("%d\n", count);
  printf("%d\n", max);

  return 0;
}