#include<iostream>
int main()
{
	int**paper = new int*[14];
	paper += 2;
	for (int i = -2; i < 12; i++)
	{
		paper[i] = new int[14];
		paper[i] += 2;
	}
	for (int i = 0; i < 10; i++)
	{
		for (int j = 0; j < 10; j++)
		{
			paper[i][j] = 0;
		}
	}
	while (true)
	{
		int x, y, s;
		char foo;
		std::cin >> x >> foo >> y >> foo >> s;
		if (std::cin.eof())
		{
			break;
		}
		paper[y][x]++;
		paper[y - 1][x]++;
		paper[y][x - 1]++;
		paper[y][x + 1]++;
		paper[y + 1][x]++;
		if (s != 1)
		{
			paper[y - 1][x - 1]++;
			paper[y - 1][x + 1]++;
			paper[y + 1][x - 1]++;
			paper[y + 1][x + 1]++;
		}
		if (s == 3)
		{
			paper[y - 2][x]++;
			paper[y][x - 2]++;
			paper[y][x + 2]++;
			paper[y + 2][x]++;
		}
	}
	int max = -1, white = 0;
	for (int i = 0; i < 10; i++)
	{
		for (int j = 0; j < 10; j++)
		{
			if (paper[i][j] == 0)
			{
				white++;
			}
			if (max < paper[i][j])
			{
				max = paper[i][j];
			}
		}
	}
	std::cout << white << std::endl;
	std::cout << max << std::endl;
	return 0;
}
