#include <iostream>
#include <cstdio>
#include <string>

using namespace std;

template<typename T, T INIT, size_t WIDTH, size_t HEIGHT>
class Field
{
	T m_data[WIDTH*HEIGHT];
	T dummy;

public:
	Field()
	{
		for(auto& i : m_data)
			i = INIT;
		dummy = INIT;
	}

	T& $(size_t x, size_t y)
	{
		if(x < 0 || WIDTH <= x || y < 0 || HEIGHT <= y)
			return dummy;

		return m_data[y * WIDTH + x];
	}
};

int main()
{
	Field<int, 0, 10, 10> field;

	string line;
	while(cin >> line)
	{
		int x, y, s;
		sscanf(line.c_str(), "%d,%d,%d", &x, &y, &s);

		switch(s)
		{
		case 3:
			field.$(x+2, y  )++;
			field.$(x-2, y  )++;
			field.$(x  , y+2)++;
			field.$(x  , y-2)++;

		case 2:
			field.$(x+1, y+1)++;
			field.$(x+1, y-1)++;
			field.$(x-1, y+1)++;
			field.$(x-1, y-1)++;

		case 1:
			field.$(x  , y  )++;
			field.$(x  , y+1)++;
			field.$(x  , y-1)++;
			field.$(x+1, y  )++;
			field.$(x-1, y  )++;
		}
	}

	int clean = 0;
	int max = 0;
	for(int y = 0; y < 10; y++)
		for(int x = 0; x < 10; x++)
		{
			int& cell = field.$(x, y);

			if(cell == 0)
				clean++;
			else if(max < cell)
				max = cell;
		}

	cout << clean << endl;
	cout << max << endl;

	return 0;
}