#include <iostream>
#include <string>
#include <math.h>
#include <stdio.h>
#include <ctype.h>

using namespace std;

int main() {
    int a[10][10]={0};
    int x,y,size;
    while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
        //size=1
        if(size >= 1){
            a[x][y]++;
            if(x-1>-1){
                a[x-1][y]++;
            }
            if(y-1>-1){
                a[x][y-1]++;
            }
            if(x+1<10){
                a[x+1][y]++;
            }
            if(y+1<10){
                a[x][y+1]++;
            }
        }
        //size=2
        if(size >= 2){
            if(x-1>-1&&y-1>-1){
                a[x-1][y-1]++;
            }
            if(x+1<10&&y-1>-1){
                a[x+1][y-1]++;
            }
            if(x+1<10&&y+1<10){
                a[x+1][y+1]++;
            }
            if(x-1>-1&&y+1<10){
                a[x-1][y+1]++;
            }
        }
        //size=3
        if(size >= 3){
            if(x-2>-1){
                a[x-2][y]++;
            }
            if(y-2>-1){
                a[x][y-2]++;
            }
            if(x+2<10){
                a[x+2][y]++;
            }
            if(y+2<10){
                a[x][y+2]++;
            }
        }
    }
    int white=0;
    int max=0;
    for(int i=0; i<10; i++){
        for(int j=0; j<10; j++){
            if(a[i][j]==0){
                white++;
            }
            if(a[i][j]>max){
                max=a[i][j];
            }
        }
    }
    cout<<white<<" "<<max<<endl;
    return 0;
}