#include <cstdio>
#define MAX 10

using namespace std;

int map[MAX][MAX] = {0};

const int def1[4][2] = {
  {1, 0},
  {-1, 0},
  {0, 1},
  {0, -1}
};

const int def2[8][2] = {
  {1, 0}, {-1, 0},
  {0, 1}, {0, -1},
  {1, 1}, {1, -1},
  {-1, 1}, {-1, -1}
};

const int def3[12][2] = {
  {1, 0}, {2, 0}, {-1, 0},
  {-2, 0}, {1, 1}, {0, 1},
  {-1, 1}, {1, -1}, {0, -1},
  {-1, -1}, {0, 2}, {0, -2}
};

void dodrop(int px, int py, const int d[][2], int size) {
  int x, y, i;
  for (i = 0; i < size; i++) {
    x = px + d[i][0];
    y = py + d[i][1];
    if (x < MAX && x >= 0 && y < MAX && y >= 0)
      map[x][y] += 1;
  }
  return;
}

void drop(int *p, int size) {
  if (size == 1)
    dodrop(p[0], p[1], def1, 4);
  if (size == 2)
    dodrop(p[0], p[1], def2, 8);
  if (size == 3)
    dodrop(p[0], p[1], def3, 12);
  return;
}

int main() {
  int p[2], size, sum, max;
  char c1, c2;
  while (scanf("%d,%d,%d", &p[0], &p[1], &size) != EOF) {
    drop(p, size);
    for (int i = sum = max = 0; i < MAX; i++) {
      for (int j = 0; j < MAX; j++) {
        if (map[i][j] == 0) sum++;
        if (map[i][j] > max) max = map[i][j];
      }
    }
  }
  printf("%d\n%d\n", sum, max);
  return 0;
}