#include <iostream>
using namespace std;
int paper[10][10]={0};

int drop(int y, int x){
	if (0<=x && x<10 && 0<=y && y<10) paper[y][x]++;
	return 0;
}

int ink(int y, int x, int size){
	switch(size){
		case 3:
			drop(y-2, x); drop(y+2, x);
			drop(y, x-2); drop(y, x+2);
		case 2:
			drop(y-1, x-1); drop(y-1, x+1);
			drop(y+1, x-1); drop(y+1, x+1);
		case 1:
			drop(y, x);
			drop(y-1, x); drop(y+1, x);
			drop(y, x-1); drop(y, x+1);
	}
	return 0;
}

int main(void){
	
	while (true){
		int x,y,size;
		char c;
		cin>>x>>c>>y>>c>>size;
		if (cin.eof()) break;
		ink(y, x, size);
	}

	int n=10, c1=0, c2=0;
	for (int i=0; i<n; i++){
		for (int j=0; j<n; j++){
			int tmp = paper[j][i];
			if (tmp==0) c1++;
			if (tmp>c2) c2=tmp;
		}
	}
	cout<<c1<<endl;
	cout<<c2<<endl;
	return 0;
}