#include <iostream>
#include <iomanip>
#include <cassert>
#include <algorithm>
#include <functional>
#include <vector>
#include <string>
#include <cstring>
#include <stack>
#include <queue>
#include <map>
#include <bitset>
#include <sstream>
#include <istream>
#include <cmath>
#include <cstdio>

using namespace std;

#define vci vector<int>
#define vcs vector<string>
#define pb push_back
#define sz size()
#define mapii map<int, int>
#define mapci map<char, int>
#define mapsi map<string, int>
#define all(x) x.begin(), x.end()
#define minit(a, i) memset(a, i, sizeof(a));

#define for_(i, a, b) for (int i=(int)a; i<(int)b; i++)
#define for_d(i, a, b) for (int i=(int)a-1; i>=b; i--)
#define for_r(i, a, b, c) for (int i=(int)a; i<(int)b; i += c)
#define for_dr(i, a, b, c) for (int i=(int)a-1; i>=b; i -= c)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)

typedef long long ll;

const int iINF = 2147483647;
const ll lINF = 9223372036854775807;

template <class T> inline void dbg(T t) { cout << t << endl; }

int s[3][3] = {
 {0, 1, 0},
 {1, 1, 1},
 {0, 1, 0}
};

int m[3][3] = {
	{1, 1, 1},
	{1, 1, 1},
	{1, 1, 1}
};

int l[5][5] = {
	{0, 0, 1, 0, 0},
	{0, 1, 1, 1, 0},
	{1, 1, 1, 1, 1},
	{0, 1, 1, 1, 0},
	{0, 0, 1, 0, 0}
};

int area[10][10];

int main() {
	minit(area, 0);
	
	int x, y, size; char c;
	while (cin>>x>>c>>y>>c>>size) {
		switch (size) {
			case 1:
				for_(i, -1, 2) {
					for_(j, -1, 2) {
						if (x+i<0  || 9<x+i || y+j<0 || 9<y+j) continue;
						area[x+i][y+j] += s[i+1][j+1];
					}
				}
				break;
			case 2:
				for_(i, -1, 2) {
					for_(j, -1, 2) {
						if (x+i<0  || 9<x+i || y+j<0 || 9<y+j) continue;
						area[x+i][y+j] += m[i+1][j+1];
					}
				}
				break;
			case 3:
				for_(i, -2, 3) {
					for_(j, -2, 3) {
						if (x+i<0  || 9<x+i || y+j<0 || 9<y+j) continue;
						area[x+i][y+j] += l[i+2][j+2];
					}
				}
				break;
			default:
				break;
		}
	}
	
	int n0 = 0, m = 0;
	for (int i=0; i<10; i++) {
		for (int j=0; j<10; j++) {
			m = max(m, area[i][j]);
			if (area[i][j]==0) n0++;
		}
	}
	
	cout << n0 << endl << m << endl;
	
	return 0;
}