#include<iostream>
using namespace std;

void Small_Ink( int a[14][14], int x, int y );
void Middle_Ink( int a[14][14], int x, int y );
void Large_Ink( int a[14][14], int x, int y );

int main()
{
    int x, y, size;
    char p;

    //本来は10*10だが、大きい配列を確保して、はみ出したところを無視すればよい
    int paper[14][14] = {};         //0で初期化

    while( cin >> x >> p >> y >> p >> size )
    {
        if( size == 1 )
            Small_Ink( paper, x + 2, y + 2 );
        else if( size == 2 )
            Middle_Ink( paper, x + 2, y + 2 );
        else
            Large_Ink( paper, x + 2, y + 2 );
    }

    int cnt = 0, max = 0;
    for( int i = 2; i < 12; i++ )
    {
        for( int j = 2; j < 12; j++ )
        {
            if( max < paper[i][j] )
                max = paper[i][j];
            if( paper[i][j] == 0 )
                cnt++;
        }
    }

    cout << cnt << endl << max << endl;

    return 0;
}

void Small_Ink( int a[14][14], int x, int y )
{
    a[x][y]++;
    a[x-1][y]++;
    a[x+1][y]++;
    a[x][y-1]++;
    a[x][y+1]++;
}

void Middle_Ink( int a[14][14], int x, int y )
{
    Small_Ink( a, x, y );
    a[x-1][y-1]++;
    a[x-1][y+1]++;
    a[x+1][y-1]++;
    a[x+1][y+1]++;
}

void Large_Ink( int a[14][14], int x, int y )
{
    Middle_Ink( a, x, y );
    a[x-2][y]++;
    a[x+2][y]++;
    a[x][y-2]++;
    a[x][y+2]++;
}
