#include<bits/stdc++.h>
using namespace std;

int paper[11][11]={0};
int dx[3][14]={{0,-1,0,1,0},
               {-1,0,1,-1,0,1,-1,0,1},
               {0,-1,0,1,-2,-1,0,1,2,-1,0,1,0}};
int dy[3][14]={{1,0,0,0,-1},
               {1,1,1,0,0,0,-1,-1,-1},
               {2,1,1,1,0,0,0,0,0,-1,-1,-1,-2}};
int size[3]={5,9,13};

int main(){
    int x, y, s;
    while(scanf("%d,%d,%d",&x,&y,&s) != EOF){
        for(int i=0;i<size[s-1];++i){
            if(x+dx[s-1][i] >= 0 && x+dx[s-1][i] < 10
                    && y+dy[s-1][i] >= 0 && y+dy[s-1][i] < 10){
                paper[y+dy[s-1][i]][x+dx[s-1][i]]++;
            }
        }
    }
    int white=0, maxi=0;
    for(int i=0;i<10;++i){
        for(int j=0;j<10;++j){
            if(paper[i][j] == 0)white++;
            maxi = max(maxi, paper[i][j]);
        }
    }
    cout << white << endl << maxi << endl;

    return 0;
}
