#include	<iostream>
#include	<cstdio>
#include	<algorithm>

using namespace std;

short inkmap[10][10] = { 0 };

void drawSmall(int, int);
void drawMedium(int, int);
void drawLarge(int, int);
void sch(short *, short *);

int main(void) {
	short mx = 0, buff[3], c = 0;
	
	while( scanf("%d,%d,%d", &buff[0], &buff[1], &buff[2]) != EOF ) {
		switch(buff[2]) {
		case 1:
			drawSmall(buff[0], buff[1]);		break;
		case 2:
			drawMedium(buff[0], buff[1]);		break;
		case 3:
			drawLarge(buff[0], buff[1]);		break;
		}
	}
	sch(&c, &mx);
	cout << c << endl << mx << endl;
}

void drawSmall(int x, int y) {
	const short vX[5] = { 0, -1, 0, 1, 0 };
	const short vY[5] = { -1, 0, 0, 0, 1 };
	int nX, nY;
	for(int i = 0; i < 5; i++) {
		nX = x + vX[i], nY = y + vY[i];
		if( ( 0 <= nX && nX < 10 ) && ( 0 <= nY && nY < 10 ) )
		inkmap[nX][nY]++;
	}
}
void drawMedium(int x, int y) {
	const short vX[9] = { -1, 0, 1, -1, 0, 1, -1, 0, 1 };
	const short vY[9] = { -1, -1, -1, 0, 0, 0, 1, 1, 1 };
	int nX, nY;
	for(int i = 0; i < 9; i++) {
		nX = x + vX[i], nY = y + vY[i];
		if( ( 0 <= nX && nX < 10 ) && ( 0 <= nY && nY < 10 ) )
		inkmap[nX][nY]++;
	}
}
void drawLarge(int x, int y) {
	const short vX[13] = { 0, -1, 0, 1, -2, -1, 0, 1, 2, -1, 0, 1, 0 };
	const short vY[13] = { -2, -1, -1, -1, 0, 0, 0, 0, 0, 1, 1, 1, 2 };
	int nX, nY;
	for(int i = 0; i < 13; i++) {
		nX = x + vX[i], nY = y + vY[i];
		if( ( 0 <= nX && nX < 10 ) && ( 0 <= nY && nY < 10 ) )
		inkmap[nX][nY]++;
	}
}
void sch(short *c, short *m) {
	for(int i = 0; i < 10; i++) {
		for(int j = 0; j < 10; j++) {
			if(inkmap[i][j] == 0) {
				(*c)++;
			}
			else {
				*m = max(*m, inkmap[i][j]);
			}
		}
	}
}