#include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#define ll long long int
#define ld long double
#define INF 1000000000
#define EPS 0.0000000001
#define rep(i,n) for(i=0;i<n;i++)
using namespace std;
typedef pair<int, int> P;

string str;

int main()
{
  int x,y,size;
  int paper[15][15]={};
  while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
    paper[y][x]++;
    if(y>0)paper[y-1][x]++;
    if(y<9)paper[y+1][x]++;
    if(x>0)paper[y][x-1]++;
    if(x<9)paper[y][x+1]++;

    if(size>1){

      if(y>0 && y<9)
	if(x>0 && x<9){
	  paper[y-1][x-1]++;
	  paper[y-1][x+1]++;
	  paper[y+1][x-1]++;
	  paper[y+1][x+1]++;
	}else if(x==0){
	  paper[y-1][x+1]++;
	  paper[y+1][x+1]++;
	}else if(x==9){
	  paper[y-1][x-1]++;
	  paper[y+1][x-1]++;
	}

      if(y==0){
	if(x>0)paper[y+1][x-1]++;
	if(x<9)paper[y+1][x+1]++;
      }else if(y==9){
	if(x>0)paper[y-1][x-1]++;
	if(x<9)paper[y-1][x+1]++;
      }

    }
    if(size==2){
      if(y>1)paper[y-2][x]++;
      if(y<8)paper[y+2][x]++;
      if(x>1)paper[y][x-2]++;
      if(x<8)paper[y][x+2]++;
    }

  }
  int white=0;
  int m=0;
  int i,j;

  rep(i,10)rep(j,10){
    if(paper[i][j]==0)white++;
    m=max(m,paper[i][j]);
  }
  cout<<white<<endl;
  cout<<m<<endl;
}