#include <iostream>
#include <cstring>
#include <string>
#include <cstdio>
#include <cmath>

using namespace std;

int dx[] = {1,0,-1,0};
int dy[] = {0,1,0,-1};
int fl;
int fie[11][11];

bool in(int i){
  return 0 <= i && i< 10;
}

int & f(int x, int y){
  if(in(x) && in(y)){
    return fie[x][y];
  } else {
    return fl;
  }
}

void disp(){
  for(int i=0; i<10; i++){
    for(int j=0; j<10; j++){
      cout << f(i,j) << " ";
    }
    cout << endl;
  }
}

int main(){
  memset(fie,0,sizeof(fie));
  int x,y,s;
  char a;
  while(cin >> x >> a >> y >> a >> s){
    f(x,y)++;
    for(int i=0; i<4; i++){
      f(x+dx[i],y+dy[i])++;
      if(s >= 2)
	f(x + dx[i] + dx[(i+1)%4], y + dy[i] + dy[(i+1)%4])++;
	if(s >= 3)
	  f(x+dx[i]*2,y+dy[i]*2)++;
    }
  }
  
  int c = 0, m = 0;
  for(int i=0; i<10; i++){
    for(int j=0; j<10; j++){
      if(!f(i,j)) c++;
      m = max(m,f(i,j));
    }
  }
  cout << c << endl;
  cout << m << endl;
  return 0;
}