#include <stdio.h>
#include <iostream>
#include <string>
using namespace std;

int input(string, int);

int main() {
	string in;
	int a[10][10] = {};
	int x, y, s, n = 0, max;
	while (cin >> in) {
		x = input(in, 0);
		y = input(in, 1);
		s = input(in, 2);
		switch (s){
		case 3:
			if (x >= 2)
				a[x - 2][y]++;
			if (x <= 7)
				a[x + 2][y]++;
			if (y >= 2)
				a[x][y-2]++;
			if (y <= 7)
				a[x][y+2]++;
		case 2:
			if (x >= 1 && y >= 1)
				a[x - 1][y - 1]++;
			if (x >= 1 && y <= 8)
				a[x - 1][y + 1]++;
			if (x <= 8 && y >= 1)
				a[x + 1][y - 1]++;
			if (x <= 8 && y <= 8)
				a[x + 1][y + 1]++;
		}
		if (x >= 1)
			a[x - 1][y]++;
		if (x <= 8)
			a[x + 1][y]++;
		if (y >= 1)
			a[x][y - 1]++;
		if (x <= 8)
			a[x][y+1]++;
		a[x][y]++;
	}
	max = a[0][0];
	for (int i = 0; i < 100; i++) {
		if (a[i / 10][i % 10] == 0)
			n++;
		if (max < a[i / 10][i % 10])
			max = a[i / 10][i % 10];
	}
	cout << n << endl << max << endl;
	return 0;
}

/*
int main() {
	string in;
	int i;
	while (1) {
		cin >> in;
		cin >> i;
		cout<<input(in, i)<<endl;
	}
}
*/
int input(string in, int n) {
	int x = 0;
	for (int i = 0;; i++) {
		if (in[i] == ',' && n > 0) {
			n--;
			continue;
		}
		if (n > 0)
			continue;
		if (in[i] == ','|| in[i] == '\0')
			return x;
		x *= 10;
		x += in[i] - '0';
	}
}
