#include <iostream>
#include <cstdio>

using namespace std;

int main() {
	int p[10][10];
	for (int i=0; i<10; i++) {
		for (int j=0; j<10; j++) {
			p[i][j] = 0;
		}
	}
	int x,y,size;
	while (scanf("%d,%d,%d", &x, &y, &size)!=EOF) {
		p[x][y]++;
		if (size==1) {
			if (y-1>=0) p[x][y-1]++;
			if (x-1>=0) p[x-1][y]++;
			if (x+1<10) p[x+1][y]++;
			if (y+1<10) p[x][y+1]++;
		} else if (size==2) {
			if (y-1>=0) p[x][y-1]++;
			if (x-1>=0) p[x-1][y]++;
			if (x+1<10) p[x+1][y]++;
			if (y+1<10) p[x][y+1]++;
			if (x-1>=0&&y-1>=0) p[x-1][y-1]++;
			if (x+1<10&&y-1>=0) p[x+1][y-1]++;
			if (x-1>=0&&y+1<10) p[x-1][y+1]++;
			if (x+1<10&&y+1<10) p[x+1][y+1]++;
		} else if (size==3) {
			if (y-1>=0) p[x][y-1]++;
			if (x-1>=0) p[x-1][y]++;
			if (x+1<10) p[x+1][y]++;
			if (y+1<10) p[x][y+1]++;
			if (x-1>=0&&y-1>=0) p[x-1][y-1]++;
			if (x+1<10&&y-1>=0) p[x+1][y-1]++;
			if (x-1>=0&&y+1<10) p[x-1][y+1]++;
			if (x+1<10&&y+1<10) p[x+1][y+1]++;
			if (y-2>=0) p[x][y-2]++;
			if (x-2>=0) p[x-2][y]++;
			if (x+2<10) p[x+2][y]++;
			if (y+2<10) p[x][y+2]++;
		}
	}
	int c=0,m=0;
	for (int i=0; i<10; i++) {
		for (int j=0; j<10; j++) {
			if (p[i][j] == 0) c++;
			else max(m,p[i][j]);
		}
	}
	cout << c << endl;
	cout << m << endl;
	return 0;
}