#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <string>
#include <cmath>

#define rep(x,to) for(int x=0;x<to;x++)
#define rep2(x,from,to) for(x=from;x<to;x++)

using namespace std;


int main(void){

int dx[]={0,0,0,1,-1,1,1,-1,-1,0,0,2,-2};
int dy[]={0,1,-1,0,0,1,-1,1,-1,2,-2,0,0};
	int sz[4] ={0,5,9,13};
int mas[12][12]={0};
int x,y,s;
char zz;
	
	while(cin >> x >> zz >> y >>zz >> s ){
		rep(i,sz[s]){
			int xx=x+dx[i]; int yy=y+dy[i];
			if(xx >=0 && xx <=9 && yy >=0 && yy<=9) mas[xx][yy]++;
		}
	}
	int wcnt =0, mx =-999;
	rep(i,10) rep(j,10){
		if(mas[i][j]==0) wcnt++;
		mx = max(mx,mas[i][j]);
	}
	cout << wcnt << endl << mx << endl;;
	return 0;
}