#include <iostream>
#include <string>
using namespace std;




int main()
{
	int area[14][14] = {0};
	int x,nx,ny,y,size;
	int count = 0;
	int max = 0;
	while(cin >> x >> y >> size){
		nx=x+2;
		ny=y+2;
		switch (size){
		case 1:
			for (int i=-1;i<2;i++){
				area[nx+i][ny]++;
				area[nx][ny+i]++;
			}
			break;
		case 2:
			for (int i=-1;i<2;i++){
				for (int j=-1;j<2;j++){
					area[nx+i][ny+j]++;
				}
			}
			break;
		default:
			for (int i=-1;i<2;i++){
				for (int j=-1;j<2;j++){
					area[nx+i][ny+j]++;
				}
			}
			area[nx-2][ny]++;
			area[nx+2][ny]++;
			area[nx][ny-2]++;
			area[nx][ny+2]++;
			break;
		}	
	}
	for (int i=2;i<12;i++){
		for (int j=2;j<12;j++){
			if (area[i][j]==0){
				count++;
			}
		}
	}
	for (int i=2;i<12;i++){
		for (int j=2;j<12;j++){
			if (max < area[i][j]){
				max=area[i][j];
			}
		}
	}
	cout << count <<endl;
	cout << max << endl;


	return 0;
}