#include <iostream>
#include <cstdio>

using namespace std;

bool onPaper(int x, int y) {
  return (0 <= x && x <= 10 &&
          0 <= y && y <= 10);
}

void smallDrop(int x, int y, int p[][10]) {
  if (onPaper(x-1, y))
    p[x-1][y]++;
  if (onPaper(x+1, y))
    p[x+1][y]++;
  if (onPaper(x, y-1))
    p[x][y-1]++;
  if (onPaper(x, y+1))
    p[x][y+1]++;
}

void middleDrop(int x, int y, int p[][10]) {
  smallDrop(x, y, p);
  if (onPaper(x-1, y-1))
    p[x-1][y-1]++;
  if (onPaper(x-1, y+1))
    p[x-1][y+1]++;
  if (onPaper(x+1, y-1))
    p[x+1][y-1]++;
  if (onPaper(x+1, y+1))
    p[x+1][y+1]++;
}

void bigDrop(int x, int y, int p[][10]) {
  middleDrop(x, y, p);
  if (onPaper(x-2, y))
    p[x-2][y]++;
  if (onPaper(x+2, y))
    p[x+2][y]++;
  if (onPaper(x, y-2))
    p[x][y-2]++;
  if (onPaper(x, y+2))
    p[x][y+2]++;
}

int main(int argc, char *argv[]) {
  int paper[10][10] = {0};
  int x, y, size;

  while (scanf("%d,%d,%d", &x, &y, &size) != -1) {
    paper[x][y]++;
    if (size == 1)
      smallDrop(x, y, paper);
    else if (size == 2)
      middleDrop(x, y, paper);
    else
      bigDrop(x, y, paper);
  }

  int white, black;
  white = black = 0;
  for (int i = 0; i < 10; i++)
    for (int j = 0; j < 10; j++)
      if (paper[i][j] == 0)
        white++;
      else if (black < paper[i][j])
        black = paper[i][j];

  cout << white << endl;
  cout << black << endl;
  return 0;
}