#include <stdio.h>
 
int field[15][15];
 
int main(void)
{
    int x, y;
    int size;
    int sum = 0, max = 0;
     
    while (scanf("%d,%d,%d", &x, &y, &size) != EOF){
         y += 2;
		 x += 2;
		 
        if (size > 0){
            field[y][x]++;
            field[y - 1][x]++;
			field[y + 1][x]++;
            field[y][x + 1]++;
            field[y][x - 1]++;
            
        }
        if (size > 1){
            field[y - 1][x - 1]++;
            field[y + 1][x + 1]++;
            field[y - 1][x + 1]++;
            field[y + 1][x - 1]++;
        }
        if (size > 2){
            field[y - 2][x]++;
            field[y + 2][x]++;
            field[y][x - 2]++;
            field[y][x + 2]++;
        }
    }
     
    for (int i = 2; i < 12; i++){
        for (int j = 2; j < 12; j++){
			
			if (field[i][j] == 0){
                sum++;
            }
            if (field[i][j] > max){
                max = field[i][j];
            }
        }
    }
	
	printf("%d\n%d\n", sum, max);
	
    return (0);
}