#include<stdio.h>

int main(void){
  int xs[] = {-1,0,0,1},ys[] = {0,-1,1,0};
  int xm[] = {-1,-1,-1,0,0,1,1,1}, ym[] = {-1,0,1,-1,1,-1,0,1};
  int xl[] = {-2,-1,-1,-1,0,0,0,0,1,1,1,2};
  int yl[] = {0,-1,0,1,-2,-1,1,2,-1,0,1,0};

  int x,y,n;
  int max = 0, cnt = 100;

  int map[14][14] = {0};

  while(scanf("%d,%d,%d",&x,&y,&n) != EOF){
    //printf("a\n");
    x += 2;
    y += 2;
    switch(n){
    case 1:
      map[x][y]++;
      if(map[x][y] > max)
	max = map[x][y];
      for(int i = 0; i < 4; i++){
	map[x + xs[i]][y + ys[i]]++;
	if(map[x+xs[i]][y + ys[i]] > max){
	  max = map[x + xs[i]][y + ys[i]];
	}
      }
      break;

    case 2:
      map[x][y]++;
      if(map[x][y] > max)
	max = map[x][y];
      for(int i = 0; i < 8; i++){
	map[x + xm[i]][y + ym[i]]++;
	if(map[x + xm[i]][y + ym[i]] > max){
	  max = map[x + xm[i]][y + ym[i]];
	}
      }
      break;

    case 3:
      map[x][y]++;
      if(map[x][y] > max)
	max = map[x][y];
      for(int i = 0; i < 12; i++){
	map[x + xl[i]][y + yl[i]]++;
	if(map[x + xl[i]][y + yl[i]] > max){
	  max = map[x + xl[i]][y + yl[i]];
	}
      }
      break;
    }
  }

  // printf("test\n");
  for(int i = 2; i < 12; i++){
    for(int j = 2; j < 12; j++){
      if(map[i][j] == 0){
	cnt++;
      }
    }
  }
    
  printf("%d\n%d",cnt,max);


  return 0;
}