#include <iostream>
#include <cstdio>
#include <vector>

enum DropSize {
	DropSize_S = 1,
	DropSize_M,
	DropSize_L
};

struct SinkCell {
	int x, y;
};

SinkCell sinkCellsForSizeS[] = {
	{0,0},{-1,0},{1,0},{0,-1},{0,1}
};
SinkCell sinkCellsForSizeM[] = {
	{-1,-1},{0,-1},{1,-1},{-1,0},{0,0},{1,0},{-1,1},{0,1},{1,1}
};
SinkCell sinkCellsForSizeL[] = {
	{0,-2},{-1,-1},{0,-1},{1,-1},{-2,0},{-1,0},{0,0},{1,0},{2,0},{-1,1},{0,1},{1,1},{0,2}
};

class Paper {
	int width_;
	int height_;
	std::vector<int> depth_;
	void SinkInk(int x, int y) {
		if (0 <= x && x < width_ && 0 <= y && y < height_) {
			++depth_[width_ * x + y];
		}
	}
	template<int count>
	void SinkInkToCells(int x, int y, const SinkCell (&cells)[count]) {
		for (int i = 0; i < count; ++i) {
			SinkInk(x + cells[i].x, y + cells[i].y);
		}
	}
public:
	explicit Paper(int width, int height) : width_(width), height_(height), depth_(width * height, 0)
	{
	}
	void DropInk(int x, int y, DropSize size)
	{
		if (0 <= x && x < width_ && 0 <= y && y < height_) {
			switch (size) {
				case DropSize_S:
					SinkInkToCells(x, y, sinkCellsForSizeS);
					break;
				case DropSize_M:
					SinkInkToCells(x, y, sinkCellsForSizeM);
					break;
				case DropSize_L:
					SinkInkToCells(x, y, sinkCellsForSizeL);
					break;
				default:
					break;
			}
		}
	}
	int Depth(int x, int y) const
	{
		return depth_[width_ * x + y];
	}
private:
};

int main()
{
	const int width = 10;
	const int height = 10;
	Paper paper(width, height);
	int x, y, size;
	while (std::scanf("%d,%d,%d", &x, &y, &size) == 3) {
		paper.DropInk(x, y, static_cast<DropSize>(size));
	}

	int maxDepth = 0;
	int whiteCount = 0;
	for (int x = 0; x < width; ++x) {
		for (int y = 0; y < height; ++y) {
			if (maxDepth < paper.Depth(x, y)) {
				maxDepth = paper.Depth(x, y);
			}
			if (paper.Depth(x, y) == 0) {
				++whiteCount;
			}
		}
	}

	std::printf("%d\n%d\n", whiteCount, maxDepth);

	return 0;
}