#include <algorithm>
#include <map>
#include <vector>
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstring>
#include <cctype>
#include <cstdlib>
#include <cmath>
#include <string>
#include <queue>
#include <stack>
using namespace std;

#define REP(i,n) for(int i=0; i<n; ++i)
#define IREP(it,array) for(vector<int>::iterator it=array.begin(); it!=array.end(); ++it)
#define SREP(it,array) for(vector<string>::iterator it=array.begin(); it!=array.end(); ++it)
#define MP make_pair
typedef long long LL;
#define EPS (1e-6)
double zero(double d){
  return d < EPS ? 0.0 : d;
}

typedef pair<int,int> P;

int main()
{
  cout.setf(ios::fixed, ios::floatfield);
  cout.precision(7);
  int INF = 1000000;

  int xm = 2;
  int ym = 2;

  int paper[10+xm+xm][10+ym+ym];
  memset(paper,0,sizeof(paper));

  int x,y,size;
  char buf;
  while(cin>>x>>buf>>y>>buf>>size){
    x += xm;
    y += ym;

    paper[x][y]++;

    switch(size){
    case 3:
      paper[x-2][y]++;
      paper[x+2][y]++;
      paper[x][y-2]++;
      paper[x][y+2]++;

    case 2:
      paper[x-1][y-1]++;
      paper[x+1][y+1]++;
      paper[x+1][y-1]++;
      paper[x-1][y+1]++;      

    case 1:
      paper[x-1][y]++;
      paper[x+1][y]++;
      paper[x][y-1]++;
      paper[x][y+1]++;
      break;
    }
  }


  int m=0;
  int white=0;
  for(int i=xm; i<10+xm; i++){
    for(int j=ym; j<10+ym; j++){
      m = max( paper[i][j], m);
      if(paper[i][j]==0)
	white++;
    }
  }

  cout << white << endl << m << endl;

  return 0;
}