#include <iostream>
#include <cstdio>
using namespace std;
int f[10][10];

int main()
{
	int x,y,s;
	int sx[]={-1,0,1,0},sy[]={0,1,0,-1},
			mx[]={-1,-1,-1,0,0,1,1,1},my[]={-1,0,1,-1,1,-1,0,1},
			lx[]={-2,-1,-1,-1,0,0,0,0,1,1,1,2},ly[]={0,-1,0,1,-2,-1,1,2,-1,0,1,0};

	while(scanf("%d,%d,%d",&x,&y,&s)!=EOF)
	{
		f[y][x]++;
		if(s==1)
		{
			for (int i = 0; i < 4; ++i)
			{
				int nx=x+sx[i],ny=y+sy[i];
				if(0<=nx&&nx<10&&0<=ny&&ny<10)
				{
					f[ny][nx]++;
				}
			}
		}
		else if(s==2)
		{
			for (int i = 0; i < 8; ++i)
			{
				int nx=x+mx[i],ny=y+my[i];
				if(0<=nx&&nx<10&&0<=ny&&ny<10)
				{
					f[ny][nx]++;
				}
			}
		}
		else
		{
			for (int i = 0; i < 12; ++i)
			{
				int nx=x+lx[i],ny=y+ly[i];
				if(0<=nx&&nx<10&&0<=ny&&ny<10)
				{
					f[ny][nx]++;
				}
			}
		}
	}
	int ans=0,zero=0;
	for (int i = 0; i < 10; ++i)
	{
		for (int j = 0; j < 10; ++j)
		{
			ans=max(ans,f[i][j]);
			if(f[i][j]==0) zero++;
		}
	}
	cout<<zero<<endl;
	cout<<ans<<endl;
	return 0;
}