#include <cstdio>
#include <iostream>
#include <string>
#include <complex>
using namespace std;

#define REP(i, n)       REPEAT(i, 0, n)
#define REPEAT(i, k, n) for (int i = (k); i < (n); ++i)
#define MAX(p1,p2)      (((p1)>(p2))?(p1):(p2))
typedef double D;
typedef complex<D>P;

const int MAX_X = 10;
const int MAX_Y = 10;
int m[MAX_Y+1][MAX_X+1];

int main(){
    string s;
    while(getline(cin, s)){
        int x, y, sz;
        sscanf(s.c_str(), "%d,%d,%d", &x, &y, &sz);
        P p1(x,y);
        double r = (sz + 1.0) / 2; r = r*r;
        REPEAT(ny, -2, 3){
            int y2 = y + ny; if(y2 < 0 || y2 >= MAX_Y) continue;
            REPEAT(nx, -2, 3){
                int x2 = x + nx; if(x2 < 0 || x2 >= MAX_X) continue;
                P p2(x2, y2);
                if(norm(p1-p2) <= r) m[y2][x2]++;
            }
        }
    }
    int zeronum = 0, max = -1;
    REP(y,MAX_Y) REP(x,MAX_X){
        if(m[y][x] == 0) zeronum++;
        max = MAX(max, m[y][x]);
    }
    cout << zeronum << endl << max << endl;
    return 0;
}