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

int main() {
  int a[10][10]={},x,y,z,count=0, max=0;
  while(scanf("%d%*c%d%*c%d",&x,&y,&z)==3) {
    if(z>2) {
      if(y-2>=0) a[x][y-2]++;
      if(y+2<10) a[x][y+2]++;
      if(x-2>=0) a[x-2][y]++;
      if(x+2<10) a[x+2][y]++;
    }
    if(z>1) {
      if(y+1<10 && x-1>=0) a[x-1][y+1]++;
      if(y+1<10 && x+1<10) a[x+1][y+1]++;
      if(y-1>=0 && x-1>=0) a[x-1][y-1]++;
      if(y-1>=0 && x+1<10) a[x+1][y-1]++;
    }
    if(z>0) {
      if(y+1<10) a[x][y+1]++;
      if(y-1>=0) a[x][y-1]++;
      if(x-1>=0) a[x-1][y]++;
      if(x+1<10) a[x+1][y]++;
      a[x][y]++;
    }
  }
  for(int i=0; i<10; i++) {
    for(int j=0; j<10; j++) {
      if(a[i][j]==0) count++;
      if(a[i][j]>max) max=a[i][j];
    }
  }
  cout << count << endl << max << endl;
  return 0;
}
