#include <iostream>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <map>
using namespace std;

const int H = 10;
const int W = H;
int G[H][W];

int main() {
  fill(G[0], G[H], 0);
  int x, y, size;
  while(scanf("%d,%d,%d", &x, &y, &size) != EOF) {
    vector<pair<int,int> > v;
    if(size >= 1) {
      v.push_back(make_pair(0,0));
      v.push_back(make_pair(1,0));
      v.push_back(make_pair(0,1));
      v.push_back(make_pair(-1,0));
      v.push_back(make_pair(0,-1));
    }
    if(size >= 2) {
      v.push_back(make_pair(1,1));
      v.push_back(make_pair(1,-1));
      v.push_back(make_pair(-1,1));
      v.push_back(make_pair(-1,-1));
    }
    if(size >= 3) {
      v.push_back(make_pair(2,0));
      v.push_back(make_pair(0,2));
      v.push_back(make_pair(-2,0));
      v.push_back(make_pair(0,-2));
    }
    for(int i = 0; i < v.size(); ++i) {
      int nx = x + v[i].first;
      int ny = y + v[i].second;
      if(nx < 0 || nx >= W) continue;
      if(ny < 0 || ny >= H) continue;
      ++G[ny][nx];
    }
  }
  int koi = 0;
  int space = 0;
  for(int i = 0; i < H; ++i) {
    for(int j = 0; j < W; ++j) {
      space += G[i][j] == 0;
      koi = max(koi, G[i][j]);
    }
  }
  cout << space << endl;
  cout << koi << endl;
  return 0;
}