#include<iostream>
#include<cstring>
#include<cstdio>
using namespace std;
const int MAP_SIZE = 100;
#define drp(y, x) m[(y) + 10][(x) + 10] += 1

int m[MAP_SIZE][MAP_SIZE];

void setMap(int y, int x, int s);
void searchMap();

int main(){
    int x, y, s;
    memset(m, 0, sizeof(m));
    while(scanf("%d,%d,%d", &x, &y, &s) != EOF) setMap(y, x, s);
    searchMap();
    return 0;
}

void setMap(int y, int x, int s){
    drp(y, x);
    int mx[3][4] = {{0, 1, 0, -1}, {-1, 1, 1, -1}, {0, 2, 0, -2}};
    int my[3][4] = {{-1, 0, 1, 0}, {-1, -1, 1, 1}, {-2, 0, 2, 0}};
    for(int i = 0; i < s; i++){
        for(int j = 0; j < 4; j++){
            drp(y + my[i][j], x + mx[i][j]);
        }
    }
}

void searchMap(){
    int blankSum = 0, max = -1;
    for(int i = 10; i < 20; i++){
        for(int j = 10; j < 20; j++){
            if(m[i][j] > max) max = m[i][j];
            if(m[i][j] == 0) blankSum++;
        }
    }
    cout <<blankSum <<endl <<max <<endl;
}