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

int f[10][10];
void solve(){

}
int dx[] = {0,1,0,-1,0,1,1,-1,-1,2,0,-2,0};
int dy[] = {0,0,1,0,-1,1,-1,1,-1,0,2,0,-2};
int cnt, d;
void ink(int x, int y, int s){  
  for(int i = 0; i <= 4*s; i++){
    int nx = dx[i] + x;
    int ny = dy[i] + y;
    if(nx < 0 || nx >= 10 || ny < 0 || ny >= 10)continue;  
    f[ny][nx]++;
    if(f[ny][nx] == 1)cnt++;
    d = max(d, f[ny][nx]);
  }
}
int main(){
  int x,y,size;
  cnt = d = 0;
  char c;
  memset(f, 0, sizeof(f));
  while(cin >> x >> c >> y >> c >> size){
    ink(x,y,size);
  }
  cout << 100 - cnt << endl << d << endl;
  return 0;
}