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

int main() {
  int p[10][10] = {}, x, y, s;
  char c1, c2;
  while (cin >> x >> c1 >> y >> c2 >> s) {
    int dx[] = {1, 0, -1, 0, 1, 1, -1, -1, 2, 0, -2, 0},
        dy[] = {0, 1, 0, -1, 1, -1, 1, -1, 0, 2, 0, -2};
    ++p[y][x];
    for (int i = 0; i < 4 * s; ++i) {
      int nx = x + dx[i], ny = y + dy[i];
      if (nx < 0 || 10 <= nx || ny < 0 || 10 <= ny)
        continue;
      ++p[ny][nx];
    }
  }

  int ans1 = 0, ans2 = 0;
  for (int y = 0; y < 10; ++y) {
    for (int x = 0; x < 10; ++x) {
      if (p[y][x] == 0)
        ++ans1;
      ans2 = max(p[y][x], ans2);
    }
  }

  cout << ans1 << endl << ans2 << endl;
}
