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

int main() {
	int paper[14][14] = {0};
	int x,y,size;
	
	while ( scanf("%d,%d,%d",&x,&y,&size) != EOF ) {
		for ( int i = -2; i <= 2; i++ ) {
			for ( int j = -2; j <= 2; j++ ) {
				if ( i*i + j*j > 4 &&(  y != 0 ||  x != 0)){
					continue;
				}
				if ( size < 3 ) {
					if ( size < 2 && i*i + j*j > 1 ){
						continue;
					}
					if ( i * i > 1 || j * j > 1 ){
						continue;
					}
				}
				paper[x+2+i][y+2+j]++;
			}
		}
	}
	
	int zero=0,max=0;
	for ( int i = 2; i < 12; i++ ) {
		for ( int j = 2; j < 12; j++ ) {
			if ( paper[i][j] == 0 )	zero++;
			if ( max < paper[i][j] )	max = paper[i][j];
		}
	}
	cout << zero << endl << max << endl;
	
	return 0;
}