#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstdio>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)

int xy[10][10];

void set(int x, int y)
{
    if(x>=0 && y>=0 && x<=9 && y<=9)
        xy[x][y]++;
}

int main(void)
{
    int size, x, y, white, deep;
    while(~scanf("%d,%d,%d", &x, &y, &size))
    {
        if(size >= 1)
        {
            set(x,y);
            set(x,y-1);
            set(x,y+1);
            set(x-1,y);
            set(x+1,y);
        }
        if(size >= 2)
        {
            set(x+1,y+1);
            set(x+1,y-1);
            set(x-1,y+1);
            set(x-1,y-1);
        }
        if(size == 3)
        {
            set(x+2,y);
            set(x-2,y);
            set(x,y+2);
            set(x,y-2);
        }
    }
    
    white = 0;
    deep = 0;
    rep(i,10)
    {
        rep(j,10)
        {
            if(xy[i][j] == 0)
                white++;
            if(deep < xy[i][j])
                deep = xy[i][j];
        }
    }
    
    cout << white << endl << deep << endl;

    return 0;
}