#include <iostream>
#include <string>
#include <stack>
#include <math.h>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <vector>

using namespace std;
int a[14][14];
void drop_ink(int x, int y, int s);

int main()
{
	int count = 0;
	int max = 0;
	for (int i = 0; i < 14; i++) {
		for (int j = 0; j < 14; j++) {
			a[i][j] = 0;
		}
	}
	int x, y, s;
	while (cin >> x >> y >> s) {
		drop_ink(x, y, s);
	}
	for (int i = 2; i <= 11; i++) {
		for (int j = 2; j <= 11; j++) {
			if (a[i][j] == 0) {
				count++;
			}
			if (a[i][j]>max) {
				max = a[i][j];
			}
		}
	}
	cout << count << endl << max << endl;
}

void drop_ink(int x, int y, int s) {
	if (s == 1) {
		a[x + 2][y + 2]++;
		a[x + 2][y + 1]++;
		a[x + 2][y + 3]++;
		a[x + 3][y + 2]++;
		a[x + 1][y + 2]++;
	}
	if (s == 2) {
		drop_ink(x, y, 1);
		a[x + 1][y + 1]++;
		a[x + 1][y + 3]++;
		a[x + 3][y + 1]++;
		a[x + 3][y + 3]++;
	}
	if (s == 3) {
		drop_ink(x, y, 2);
		a[x + 2][y]++;
		a[x + 2][y + 4]++;
		a[x][y + 2]++;
		a[x + 4][y + 2]++;
	}
}