#include <iostream>
#include <cstdio>
using namespace std;
int main(){
	int x,y,s;
	char com;
	int a[10][10];
	for(int i=0;i<100;i++) a[i/10][i%10] = 0;
	while(cin >> x >> com >> y >> com >> s){
		a[x][y]++;
		if(x>0) a[x-1][y]++;
		if(x<9) a[x+1][y]++;
		if(y>0) a[x][y-1]++;
		if(y<9) a[x][y+1]++;
		if(s>1){
			if(x>0 and y>0) a[x-1][y-1]++;
			if(x>0 and y<9) a[x-1][y+1]++;
			if(x<9 and y>0) a[x+1][y-1]++;
			if(x<9 and y<9) a[x+1][y+1]++;
		}
		if(s==3){
			if(x>1) a[x-2][y]++;
			if(x<8) a[x+2][y]++;
			if(y>1) a[x][y-2]++;
			if(y<8) a[x][y+2]++;
		}
	}
	int c = 0;
	int b = 0;
	for(int i=0;i<100;i++){
		int t = a[i/10][i%10];
		if(t==0) c++;
		if(b<t) b = t;
	}
	cout << c << endl;
	cout << b << endl;
}