#include<iostream>
#include<vector>
using namespace std;

#define W 10
#define H 10

int main()
{
	vector< vector<int> > paper(W, vector<int>(H));
	int x, y, size;
	int i, j;
	int blank, max;

	while (scanf("%d,%d,%d", &x, &y, &size) != EOF) {
		switch (size) {
			case 3:
				if (x-2 >= 0) paper[x-2][y] ++;
				if (x+2 < W) paper[x+2][y] ++;
				if (y-2 >= 0) paper[x][y-2] ++;
				if (y+2 < H) paper[x][y+2] ++;
			case 2:
				if (x-1 >= 0 && y-1 >= 0) paper[x-1][y-1] ++;
				if (x-1 >= 0 && y+1 <= H) paper[x-1][y+1] ++;
				if (x+1 <= W && y-1 >= 0) paper[x+1][y-1] ++;
				if (x+1 <= W && y+1 <= H) paper[x+1][y+1] ++;
			case 1:
				if (x-1 >= 0) paper[x-1][y] ++;
				if (x+1 < W) paper[x+1][y] ++;
				if (y-1 >= 0) paper[x][y-1] ++;
				if (y+1 < H) paper[x][y+1] ++;
				paper[x][y] ++;
				break;
		}
	}

	blank = 0;
	max = 0;
	for (i = 0; i < W; i++) {
		for (j = 0; j < H; j++) {
			if (paper[i][j] == 0) blank++;
			else if (paper[i][j] > max) max = paper[i][j];
		}
	}

	cout<<blank<<endl;
	cout<<max<<endl;

	return 0;
}