#include <iostream>
#include <algorithm>
#include <sstream>
using namespace std;
int G[10][10],mx;
bool in(int x,int y){
  if(0<=x && x < 10 && 0<=y && y < 10)return true;
  else return false;
}
void m(int x,int y,int size)
{
  G[x][y]++;
  if(size == 1){
    if(in(x,y+1))G[x][y+1]++;
    if(in(x,y-1))G[x][y-1]++;
    if(in(x+1,y))G[x+1][y]++;
    if(in(x-1,y))G[x-1][y]++;
  } else if(size == 2){
    if(in(x,y+1))G[x][y+1]++;
    if(in(x,y-1))G[x][y-1]++;
    if(in(x+1,y))G[x+1][y]++;
    if(in(x-1,y))G[x-1][y]++;
    if(in(x-1,y-1))G[x-1][y-1]++;
    if(in(x+1,y+1))G[x+1][y+1]++;
    if(in(x-1,y+1))G[x-1][y+1]++;
    if(in(x+1,y-1))G[x+1][y-1]++;
  } else {
    if(in(x,y+1))G[x][y+1]++;
    if(in(x,y-1))G[x][y-1]++;
    if(in(x+1,y))G[x+1][y]++;
    if(in(x-1,y))G[x-1][y]++;
    if(in(x-1,y-1))G[x-1][y-1]++;
    if(in(x+1,y+1))G[x+1][y+1]++;
    if(in(x-1,y+1))G[x-1][y+1]++;
    if(in(x+1,y-1))G[x+1][y-1]++;
    if(in(x+2,y))G[x+2][y]++;
    if(in(x-2,y))G[x-2][y]++;
    if(in(x,y+2))G[x][y+2]++;
    if(in(x,y-2))G[x][y-2]++;
  }
}
int main(){
  char d;
  int a,b,c;
  mx = 0;
  fill(G[0],G[10],0);
  while(cin >> a >> d >> b >> d >>c  ){
    m(a,b,c);
  }
  int cnt = 0;
  for(int i = 0 ; i < 10 ; i++ ){
    for(int j = 0 ; j < 10 ; j++ ){
      if(G[j][i] > mx)mx = G[j][i];
      if(G[j][i] == 0)cnt++;
    }
  }
  cout << cnt << endl;
  cout << mx << endl;
  return 0;
}