#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using pii = pair<int, int>;

vector<vector<pii>> drop = {
  {{-1, 0}, {0, -1}, {0, 0}, {0, 1}, {1, 0}},
  {{-1, -1}, {-1, 0}, {-1, 1}, {0, -1}, {0, 0}, {0, 1}, {1, -1}, {1, 0}, {1, 1}},
  {{-2, 0}, {-1, -1}, {-1, 0}, {-1, 1}, {0, -2}, {0, -1}, {0, 0}, {0, 1}, {0, 2}, {1, -1}, {1, 0}, {1, 1}, {2, 0}}
};

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  
  int x, y, s;
  char c;
  int a[10][10] = {};
  while (cin >> x >> c >> y >> c >> s) {
    s--;
    for (auto i : drop[s]) {
      int ny = y + i.first, nx = x + i.second;
      if (ny >= 0 && ny < 10 && nx >= 0 && nx < 10) a[ny][nx]++;
    }
  }
  int sum = 0;
  for (int i = 0; i < 10; i++) {
    for (int j = 0; j < 10; j++) sum += a[i][j] == 0;
  }
  cout << sum << endl;
  cout << *max_element((int*)a, (int*)(a + 10)) << endl;

  return 0;
}
