#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int main(void){
  int a[15][15]={0};
  int x,y,size,c=0,m=0;
  while(scanf("%d,%d,%d",&x,&y,&size) != EOF){
    a[x][y]++;
    a[x-1][y]++;
    a[x+1][y]++;
    a[x][y-1]++;
    a[x][y+1]++;
    if(size==1) continue;
    a[x-1][y-1]++;
    a[x+1][y-1]++;
    a[x-1][y+1]++;
    a[x+1][y+1]++;
    if(size==2) continue;
    a[x-2][y]++;
    a[x+2][y]++;
    a[x][y-2]++;
    a[x][y+2]++;
  }
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      if(!a[i][j]) c++;
      m=max(m,a[i][j]);
    }
  }
  printf("%d\n%d\n",c,m);
}
