#include<iostream>
using namespace std;
int main(){
  int mas[10][10],x,y,size,count=0,max=0;
  char a,b;
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++) mas[i][j] = 0;
  }
  while(cin>>x>>a>>y>>b>>size){
    mas[y][x]++;
    for(int i=-1;i<=1;i++){
      if(i!=0){
	if(y+i>=0&&y+i<=9)mas[y+i][x]++;
	if(x+i>=0&&x+i<=9)mas[y][x+i]++;
	if(size==2||size==3&&y+i>=0&&y+i<=9&&x+i>=0&&x+i<=9){
	  mas[y+i][x+i]++;
	}
      }
    }
    if(size==2||size==3){
      if(x!=9&&y!=0) mas[y+1][x-1]++;
      if(x!=0&&y!=9) mas[y-1][x+1]++;
    }
    if(size==3){
      if(x+2<=9) mas[y][x+2]++;
      if(y+2<=9) mas[y+2][x]++;
      if(x-2>=0) mas[y][x-2]++;
      if(y-2>=0) mas[y-2][x]++;
    }
  }
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      if(mas[i][j]==0) count++;
      if(mas[i][j]>max) max = mas[i][j];
    }
  }
  cout << count << endl << max << endl;
  return 0;
}
    