#include <stdio.h>
#include <math.h>

int main()
{
	int x,y,size;
	unsigned char arr[ 14 * 14 ];

	while ( scanf("%d,%d,%d", &x, &y, &size ) != EOF ) {
		x+=2; y+=2;
		arr[ 14 * ( x - 1 ) + y ]++;
		arr[ 14 * x + y ]++;
		arr[ 14 * ( x + 1 ) + y ]++;
		arr[ 14 * x  + y - 1 ]++;
		arr[ 14 * x + y ]++;
		arr[ 14 * x  + y + 1 ]++;
		if( size == 2 ) {
			arr[ 14 * ( x - 1 ) + y - 1 ]++;
			arr[ 14 * ( x - 1 ) + y + 1 ]++;
			arr[ 14 * ( x + 1 ) + y - 1 ]++;
			arr[ 14 * ( x + 1 ) + y + 1 ]++;
		}
		if( size == 3 ) {
			arr[ 14 * ( x - 2 ) + y  ]++;
			arr[ 14 * ( x + 2 ) + y  ]++;
			arr[ 14 * x + y - 2  ]++;
			arr[ 14 * x + y + 2 + y  ]++;
		}
	}
	
	int cnt = 0;
	int maxv = 0;

	for( int i = 2; i < 12; i++ ) {
		for( int j = 2; j < 12; j++ ) {
			if( arr[ 14 * j + i ] == 0 ) {
				cnt++;
			}
			else if( maxv < arr[ 14 * j + i ] ) {
				maxv = arr[ 14 * j + i ] ;
			}
		}
	}

	printf("%d\n%d\n", cnt, maxv);
        return 0;
}
  