#include <algorithm>
#include <cctype>
#include <cstdio>
#include <cmath>
#include <iostream>
#include <functional>
#include <queue>
#include <string>
#include <map>
#include <vector>

using namespace std;

int p[10][10];

void drop(int x, int y) {
  if (0 <= x && x < 10 && 0 <= y && y < 10)
    p[x][y]++;
}

int main() {
  int x, y, s;
  while (scanf("%d,%d,%d", &x, &y, &s) == 3)
    switch (s) {
    case 3:
      drop(x-2, y);
      drop(x+2, y);
      drop(x, y-2);
      drop(x, y+2);
    case 2:
      drop(x-1, y-1);
      drop(x-1, y+1);
      drop(x+1, y-1);
      drop(x+1, y+1);
    case 1:
      drop(x-1, y);
      drop(x+1, y);
      drop(x, y);
      drop(x, y-1);
      drop(x, y+1);
      break;
    default:
      break;
    }
  int c = 0, d = 0;
  for (int i = 0; i < 10; i++)
    for (int j = 0; j < 10; j++) {
      if (!p[i][j]) c++;
      d = max(d, p[i][j]);
    }
  printf("%d\n%d\n", c, d);
  return 0;
}