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

int main(){
	int mat[10][10];
	memset(mat,0,sizeof(mat));
	int x,y,s;
	while(scanf("%d,%d,%d",&y,&x,&s)==3){
		mat[x][y]++;
		if(y-1>=0)mat[x][y-1]++;
		if(x-1>=0)mat[x-1][y]++;
		if(x+1<10)mat[x+1][y]++;
		if(y+1<10)mat[x][y+1]++;
		if(s>1){
			if(x-1>=0 && y-1>=0)mat[x-1][y-1]++;
			if(x+1<10 && y-1>=0)mat[x+1][y-1]++;
			if(x+1<10 && y+1<10)mat[x+1][y+1]++;
			if(x-1>=0 && y+1<10)mat[x-1][y+1]++;
			if(s==3){
				if(y-2>=0)mat[x][y-2]++;
				if(x-2>=0)mat[x-2][y]++;
				if(x+2<10)mat[x+2][y]++;
				if(y+2<10)mat[x][y+2]++;		
			}
		}
	}
	x = 0;
	s = 0;
	int maxi = 0;
	for(x=0;x<10;++x){
		for(y=0;y<10;++y){
			if(mat[x][y] == 0)s++;
			maxi = max(maxi,mat[x][y]);
		}
	}
	cout<<s<<endl<<maxi<<endl;
	return 0;
}