#include <bits/stdc++.h>
using namespace std;
int paper[10][10];
const int dx[] = { 0, 0, -1, 1, -1, -1,  1, 1,  0, 0, -2, 2};
const int dy[] = {-1, 1,  0, 0, -1,  1, -1, 1, -2, 2,  0, 0};

int main() {
  int x, y, s;
  char c;
  while (cin >> x >> c >> y >> c >> s) {
    paper[y][x]++;
    for (int i = 0; i < s * 4; i++) {
      int px = x + dx[i];
      int py = y + dy[i];
      if (px >= 0 && px < 10 && py >= 0 && py < 10){
        paper[py][px]++;
      }
    }
  }
  int num_of_cells = 0, max_density = 0;
  for (int i = 0; i < 10; i++)
  {
    for (int j = 0; j < 10; j++)
    {
      if (paper[j][i] == 0) num_of_cells++;
      max_density = max(paper[j][i], max_density);
    }
  }
  cout << num_of_cells << "\n" << max_density << "\n";
}

