
#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <stack>
#include <cctype>
#include <complex>
#include <vector>
#include <algorithm>
#include <cassert>

using namespace std;


bool solve(){
	int dx1[] = {0, 1, 0, -1, 0};
	int dy1[] = {0, 0, 1, 0, -1};
	int dx2[] = {0, 0, 0, 1, 1, 1, -1, -1, -1};
	int dy2[] = {-1, 0, 1, -1, 0, 1, -1, 0, 1};
	int dx3[] = {0, 0, 0, 0, 0, 1, 1, 1, 2, -1, -1, -1, -2};
	int dy3[] = {-2, -1, 0, 1, 2, -1, 0, 1, 0, -1, 0, 1, 0};

	int a[14][14] = {0};
	int x, y, size;
	char c[2];
	while(cin>>x){
		cin>> c[0]>> y>> c[1]>> size;
		x += 2;
		y += 2;
		switch(size){
			case 1:
				for(int i=0;i<5;i++){
					a[x+dx1[i]][y+dy1[i]]++;
				}
				break;
			case 2:
				for(int i=0;i<9;i++){
					a[x+dx2[i]][y+dy2[i]]++;
				}
				break;
			case 3:
				for(int i=0;i<13;i++){
					a[x+dx3[i]][y+dy3[i]]++;
				}
				break;
			default: 
				cout<< "default"<< endl;
				break;
		}
	}
	int ans = 0;
	int ans2 = 0;
	for(int i=2;i<12;i++){
		for(int j=2;j<12;j++){
			if(a[i][j] == 0) ans++;
			ans2 = max(ans2, a[i][j]);
		}
	}
	cout<< ans<< endl;
	cout<< ans2<< endl;
	
	return true;
}

int main(){
	cout.setf(ios::fixed);
	cout.precision(10);
	solve();

	return 0;
}

 