#include <iostream>
#include <fstream>
#include <algorithm>
#include <vector>
#include <string>
#include <functional>
#include <array>
#include <stack>
#include <queue>
#include <chrono>
#include <numeric>
#include <memory.h>
#include <map>
#include <math.h>
#include <utility>
#include <set>

#pragma warning(disable:4996)
using namespace std;
#define REP(i,n) for(int i = 0 ; i < n ; ++i)
typedef long long Int;
const double PI = 3.141592653589793238;
const Int INF = 999999999999;
typedef pair<int, int> P;

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 tile[10][10];

int main()
{
	int x, y, size;
	while (scanf("%d,%d,%d",&x,&y,&size)){
		int xt = x;
		int yt = y;
		if (size == 1){
			while (xt - 1 < 0)++xt;
			while (yt - 1 < 0)++yt;
			while (xt + 2 > 9)--xt;
			while (yt + 2 > 9)--yt;

			for (int i = yt - 1; i < yt + 2; ++i){
				for (int j = xt - 1; j < xt + 2; ++j){
					tile[i][j] += S[i + 1 - yt][j + 1 - xt];
				}
			}
		}
		if (size == 2){
			while (xt - 1 < 0)++xt;
			while (yt - 1 < 0)++yt;
			while (xt + 2 > 9)--xt;
			while (yt + 2 > 9)--yt;

			for (int i = yt - 1; i < yt + 2; ++i){
				for (int j = xt - 1; j < xt + 2; ++j){
					tile[i][j] += M[i + 1 - yt][j + 1 - xt];
				}
			}

		}
		if (size == 3){
			while (xt - 1 < 0)++xt;
			while (yt - 1 < 0)++yt;
			while (xt + 3 > 9)--xt;
			while (yt + 3  > 9)--yt;

			for (int i = yt - 2; i < yt + 3; ++i){
				for (int j = xt - 2; j < xt + 3; ++j){
					tile[i][j] += L[i + 2 - yt][j + 2 - xt];
				}
			}

		}
	}
	int white = 0;
	int max_ = -1;

	REP(i, 10){
		REP(j, 10){
			if (!tile[i][j])
				++white;
			max_ = max(tile[i][j], max_);
		}
	}

	cout << white << endl << max_ << endl;

	return 0;

}