#include <iostream>
#include <vector>
#include <queue>

using namespace std;

int main(void){

	int p[10][10] = {};
	int l[4] = { 0, 5, 9, 13 };
	int d[13][2] = { { 0, 0 }, { 0, 1 }, { 1, 0 }, { 0, -1 }, { -1, 0 },		//ここまで小
					{ 1, 1 } , { 1, -1 }, { -1, 1 }, { -1, -1 },	//ここまで中
					{ 2, 0 }, { 0, 2 }, { -2, 0 }, { 0, -2 } };		//ここまで大
	int x, y, s;

	while( scanf("%d,%d,%d", &x, &y, &s) != EOF ) {
		for( int i = 0; i < l[s]; i++ ) {
			int tx = x + d[i][0], ty = y + d[i][1];
			if( tx < 0 || tx >= 9 || ty < 0 || ty >= 9 ) continue;
			p[tx][ty] ++;
		}
	}

	int cnt = 0, max = 0;
	for( int i = 0; i < 100; i++ ) {
		if( p[i%10][i/10] > max ) max = p[i%10][i/10];
		if( p[i%10][i/10] == 0 ) cnt ++;
	}
	cout << cnt << endl;
	cout << max << endl;

    return 0;
}