#include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>	// require sort next_permutation count __gcd reverse etc.
#include <cstdlib>	// require abs exit atof atoi 
#include <cstdio>		// require scanf printf
#include <functional>
#include <numeric>	// require accumulate
#include <cmath>		// require fabs
#include <climits>
#include <limits>
#include <cfloat>
#include <iomanip>	// require setw
#include <sstream>	// require stringstream 
#include <cstring>	// require memset
#include <cctype>		// require tolower, toupper
#include <fstream>	// require freopen
#include <ctime>		// require srand
#define rep(i,n) for(int i=0;i<(n);i++)
#define ALL(A) A.begin(), A.end()

using namespace std;

typedef long long ll;
typedef pair<int, int> P;
int density[15][15];
const int dr[] = { 0,-1, 0, 1, 0 };
const int dc[] = { 0, 0, 1, 0,-1 };

int main()
{
//	cut here before submit 
//	freopen ("testcase.DI", "r", stdin );
	memset (density, 0, sizeof (density ) );
	string str = "";
	while (getline (cin, str ) ){
		int n = str.length();
		rep (i, n ){
			if (str[i] == ',' ) str[i] = ' ';
		} // end rep
		stringstream ss (str );
		int col, row, size;
		ss >> col >> row >> size;
		switch (size ){
			case 1:	// small
				rep (k, 5 ){
					int nr = row + dr[k];
					int nc = col + dc[k];
					if (nr < 0 || nr >= 10 || nc < 0 || nc >= 10 ) continue;
					density[nr][nc]++;
				} // end rep
				break;
			case 2:	// medium
				for (int drow = -1; drow <= 1; drow++ ){
					for (int dcol = -1; dcol <= 1; dcol++ ){
						int nr = row + drow;
						int nc = col + dcol;
						if (nr < 0 || nr >= 10 || nc < 0 || nc >= 10 ) continue;
						density[nr][nc]++;
					} // end for
				} // end for
				break;
			case 3:	// large
				for (int drow = -1; drow <= 1; drow++ ){
					for (int dcol = -1; dcol <= 1; dcol++ ){
						int nr = row + drow;
						int nc = col + dcol;
						if (nr < 0 || nr >= 10 || nc < 0 || nc >= 10 ) continue;
						density[nr][nc]++;
					} // end for
				} // end for
				for (int k = 1; k < 5; k++ ){
					int nr = row + 2*dr[k];
					int nc = col + 2*dc[k];
					if (nr < 0 || nr >= 10 || nc < 0 || nc >= 10 ) continue;
					density[nr][nc]++;
				} // end for
				break;
		} // end switch
	} // end while
	int noink = 0;
	int max_density = 0;
	rep (i, 10 ) rep (j, 10 ){
		if (density[i][j] == 0 ) noink++;
		else
			max_density = max (max_density, density[i][j] );
	} // end rep
	cout << noink << endl;
	cout << max_density << endl;
		
	return 0;
}