#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
bool o(int a, int b){
  if(-1 < a && a < 10 && -1 < b && b < 10)
    return true;
  return false;
}

int main(){

  int paper[10][10];
  char a;
  int x,y,size;
  int num=0,most=0;

  for(int i=0;i<10;i++)
    for(int j=0;j<10;j++)
      paper[i][j] = 0;

  while(cin >> x >> a >> y >> a >> size){
    switch(size){
    case 1:
      if(o(x,y))paper[x][y]++;
      if(o(x+1,y))paper[x+1][y]++;
      if(o(x-1,y))paper[x-1][y]++;
      if(o(x,y+1))paper[x][y+1]++;
      if(o(x,y-1))paper[x][y-1]++;
      break;
    case 2:
      if(o(x,y))paper[x][y]++;
      if(o(x+1,y))paper[x+1][y]++;
      if(o(x-1,y))paper[x-1][y]++;
      if(o(x,y+1))paper[x][y+1]++;
      if(o(x,y-1))paper[x][y-1]++;
      if(o(x+1,y+1))paper[x+1][y+1]++;
      if(o(x-1,y-1))paper[x-1][y-1]++;
      if(o(x-1,y+1))paper[x-1][y+1]++;
      if(o(x+1,y-1))paper[x+1][y-1]++;
      break;
    case 3:
      if(o(x,y))paper[x][y]++;
      if(o(x+1,y))paper[x+1][y]++;
      if(o(x-1,y))paper[x-1][y]++;
      if(o(x,y+1))paper[x][y+1]++;
      if(o(x,y-1))paper[x][y-1]++;
      if(o(x+1,y+1))paper[x+1][y+1]++;
      if(o(x-1,y-1))paper[x-1][y-1]++;
      if(o(x-1,y+1))paper[x-1][y+1]++;
      if(o(x+1,y-1))paper[x+1][y-1]++;
      if(o(x+2,y))paper[x+2][y]++;
      if(o(x-2,y))paper[x-2][y]++;
      if(o(x,y+2))paper[x][y+2]++;
      if(o(x,y-2))paper[x][y-2]++;
      break;
    }
  }
  for(int i=0;i<10;i++)
    for(int j=0;j<10;j++){
      if(paper[i][j] == 0)
	num++;
      if(paper[i][j] > most)
	most = paper[i][j];
    }
  cout << num << endl << most << endl;

  return 0;
}