////#include <stdio.h>
////#include <math.h>
////int main(){
////double v;
////while(scanf("%lf",&v) != EOF){
////double y=v*v/19.6;
////int z=y;
////if(y==z){
////if(z%5==0){
////	z=y/5+1;
////printf("%d\n",z);
////continue;
////}
////}
////int q=y/5;
////q += 2;
////printf("%d\n",q);
////}
////return 0;
//
//#include <stdio.h>
//  int main(){ 
//	  int a[5],b[5],i,j;
//	  int hit=0,blow=0;
//	  while(scanf("%d %d %d %d %d %d %d %d",&a[1],&a[2],&a[3],&a[4],&b[1],&b[2],&b[3],&b[4]) != EOF){
//		  for(i=1;i<=4;i++){
//			  if(a[i]==b[i]){
//				  hit++;
//			  }
//		  }
//		  for(i=1;i<=4;i++){
//			  for(j=1;j<= 4;j++){
//				  if(j != i){
//				  if(a[i]==b[j]){
//					  blow++;
//				  }	  
//			  }
//			  }
//		  }
//		  printf("%d %d\n",hit,blow);
//		  hit=0; blow=0;
//	  }
//	  return 0;
//  }
#include <stdio.h>
  int main(){
               int x,y,s;
int i,j,num=0;
int xy[10][10]={};
	  while(scanf("%d,%d,%d",&x,&y,&s) != EOF){		  if(s==1){
			  xy[x][y]++;
			  xy[x-1][y]++;
			  xy[x+1][y]++;
			  xy[x][y-1]++;
			  xy[x][y+1]++;
		  }else if(s==2){
			  xy[x-1][y-1]++;
			  xy[x-1][y]++;
			  xy[x-1][y+1]++;
			  xy[x][y-1]++;
			  xy[x][y]++;
			  xy[x][y+1]++;
			  xy[x+1][y-1]++;
			  xy[x+1][y]++;
			  xy[x+1][y+1]++;
		  }else if(s==3){
			  xy[x-2][y]++;
			  xy[x-1][y-1]++;
			  xy[x-1][y]++;
			  xy[x-1][y+1]++;
			  xy[x][y-2]++;
			  xy[x][y-1]++;
			  xy[x][y]++;
			  xy[x][y+1]++;
			  xy[x][y+2]++;
			  xy[x+1][y-1]++;
			  xy[x+1][y]++;
			  xy[x+1][y+1]++;
			  xy[x+2][y]++;
		  }
	  }
	  int max=xy[0][0];
	  for(i=0;i<10;i++){
		  for(j=0;j<10;j++){
			  if(xy[i][j]==0) num++;
			  if(xy[i][j]>max) max=xy[i][j];
		  }
	  }
	  printf("%d\n%d\n",num,max);
	  return 0;
  }