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

int main(){
  int x,y,size,cnt = 0,ma = -1;
  int mas[10][10] = {0};
  int dx1[4] = {0,1,0,-1},dy1[4] = {1,0,-1,0};
  int dx2[8] = {0,1,0,-1,1,1,-1,-1},dy2[8] = {1,0,-1,0,1,-1,1,-1};
  int dx3[12]={1,0,-1,0,1,1,-1,-1,0,0,2,-2},dy3[12]={0,1,0,-1,-1,1,1,-1,2,-2,0,0};
  while(scanf("%d,%d,%d",&x,&y,&size) != EOF){
    if(size == 1){
      mas[y][x] += 1;
      for(int i=0;i<4;i++){
	int nx = x+dx1[i];
	int ny = y+dy1[i];
	if(nx >= 0 && nx < 10 && ny >= 0 && ny < 10) mas[ny][nx] += 1;
      }
    }
    if(size == 2){
      mas[y][x] += 1;
      for(int i=0;i<8;i++){
	int nx = x+dx2[i];
	int ny = y+dy2[i];
	if(nx >= 0 && nx < 10 && ny >= 0 && ny < 10) mas[ny][nx] += 1;
      }
    }
    if(size == 3){
      mas[y][x] += 1;
      for(int i=0;i<12;i++){
	int nx = x+dx3[i];
	int ny = y+dy3[i];
	if(nx >= 0 && nx < 10 && ny >= 0 && ny < 10) mas[ny][nx] += 1;
      }
    }
  }
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      if(mas[i][j] == 0) cnt++;
      ma = max(ma,mas[i][j]);
    }
  }
  cout << cnt << endl << ma << endl;
}