#include <cstdio>
using namespace std;
 
int main()
{
    int xy[10][10] = {'0'};
    int x,y,size;
    xy[0][0] = 0;
     
    while(scanf("%d,%d,%d", &x,&y,&size) != EOF){
         
        xy[y-1][x]++;
        xy[y][x-1]++;
        xy[y][x]++;
        xy[y][x+1]++;
        xy[y+1][x]++;
         
        if(size >= 2){
            xy[y-1][x-1]++;
            xy[y-1][x+1]++;
            xy[y+1][x-1]++;
            xy[y+1][x+1]++;
        }
        if(size == 3){
            xy[y-2][x]++;
            xy[y][x-2]++;
            xy[y][x+2]++;
            xy[y+2][x]++;
        }
    }
     
    int w=0,con = 0;
     
    for(int i=0; i < 10; i++){
        for(int j=0; j < 10; j++){
            if(xy[i][j] == 0)w++;
            if(con < xy[i][j])con = xy[i][j];
        }
    }
     
    printf("%d\n%d\n", w, con);
     
    return (0);
}