#include <stdio.h>
#include <iostream>
#include <algorithm>
using namespace std;

inline bool check(int x, int y)
{
	if (x >= 0 && x <= 9 && 0 <= y && y <= 9) return true;
	else false;
}

int main()
{
	int mass[12][12] = { {0} };
	int x, y, s, non = 0, maxim = -1;

	while (scanf("%d,%d,%d", &x, &y, &s) != EOF)
	{
		switch (s)
		{
		case 1:
			mass[x][y]++;
			if (check(x, y - 1)) mass[x][y - 1]++;
			if (check(x, y + 1)) mass[x][y + 1]++;
			if (check(x - 1, y)) mass[x - 1][y]++;
			if (check(x + 1, y)) mass[x + 1][y]++;
			break;
		case 2:
			mass[x][y]++;
			if (check(x - 1, y - 1)) mass[x - 1][y - 1]++;
			if (check(x, y - 1)) mass[x][y - 1]++;
			if (check(x + 1, y - 1)) mass[x + 1][y - 1]++;
			if (check(x - 1, y)) mass[x - 1][y]++;
			if (check(x + 1, y)) mass[x + 1][y]++;
			if (check(x - 1, y + 1)) mass[x - 1][y + 1]++;
			if (check(x, y + 1)) mass[x][y + 1]++;
			if (check(x + 1, y + 1)) mass[x + 1][y + 1]++;
			break;
		case 3:
			mass[x][y]++;
			if (check(x - 1, y - 1)) mass[x - 1][y - 1]++;
			if (check(x, y - 1)) mass[x][y - 1]++;
			if (check(x + 1, y - 1)) mass[x + 1][y - 1]++;
			if (check(x - 1, y)) mass[x - 1][y]++;
			if (check(x + 1, y)) mass[x + 1][y]++;
			if (check(x - 1, y + 1)) mass[x - 1][y + 1]++;
			if (check(x, y + 1)) mass[x][y + 1]++;
			if (check(x + 1, y + 1)) mass[x + 1][y + 1]++;
			if (check(x, y - 2)) mass[x][y - 2]++;
			if (check(x - 2, y)) mass[x - 2][y]++;
			if (check(x + 2, y)) mass[x + 2][y]++;
			if (check(x, y + 2)) mass[x][y + 2]++;
			break;
		}
	}
	for (int i = 0; i < 10; i++)
	{
		for (int j = 0; j < 10; j++)
		{
			if (mass[i][j] == 0) non++;
			maxim = max(maxim, mass[i][j]);
		}
	}
	cout << non << endl << maxim << endl;
	return 0;
}
