#include <iostream>
#include <stdio.h>

int paper[10][10]={0};

void paint(int x, int y)
{
	if( x>=0 && x<=9 && y>=0 && y<=9)
		paper[x][y]++;
	return;
}

void drop(int x, int y, int size)
{
	switch(size)
	{
		case 1:
			paint(x-1, y);
			paint(x+1, y);
			paint(x, y-1);
			paint(x, y+1);
			paint(x, y);
			break;
		case 2:
			drop(x,y,1);
			paint(x-1, y-1); paint(x-1, y+1);
			paint(x+1, y-1); paint(x+1, y+1);
			break;
		case 3:
			drop(x,y,2);
			paint(x-2,y);paint(x,y-2);
			paint(x+2,y);paint(x,y+2);
			break;
	}
	return;
}

int main(void)
{
	int x,y,s;
	while(~scanf("%d,%d,%d",&x,&y,&s))
		drop(x,y,s);

	int blank=0;
	int max=0;
	for(int i=0; i<10; i++)
		for(int j=0; j<10; j++)
		{
			if(paper[i][j]==0)
				blank++;
			if(paper[i][j] > max)
				max = paper[i][j];
		}
	std::cout << blank << std::endl << max << std::endl;

	return 0;
}
			
			