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

int main(void){
    std::vector<std::vector<int>> vec(10,vector<int>(10,0));
    int x,y,s;
    char c;
    while (cin>>x>>c>>y>>c>>s) {
        if (s==1) {
            vec.at(y).at(x)++;
            if (y-1>=0) { //上
                vec.at(y-1).at(x)++;
            }
            if (x-1>=0) { //左
                vec.at(y).at(x-1)++;
            }
            if (x+1<=9) { //右
                vec.at(y).at(x+1)++;
            }
            if (y+1<=9) { //下
                vec.at(y+1).at(x)++;
            }
        } else if (s==2) {
            vec.at(y).at(x)++;
            if (y-1>=0&&x-1>=0) { //左上
                vec.at(y-1).at(x-1)++;
            }
            if (y-1>=0) { //上
                vec.at(y-1).at(x)++;
            }
            if (y-1>=0&&x+1<=9) { //右上
                vec.at(y-1).at(x+1)++;
            }
            if (x-1>=0) { //左
                vec.at(y).at(x-1)++;
            }
            if (x+1<=9) { //右
                vec.at(y).at(x+1)++;
            }
            if (x-1>=0&&y+1<=9) { //左下
                vec.at(y+1).at(x-1)++;
            }
            if (y+1<=9) { //下
                vec.at(y+1).at(x)++;
            }
            if (x+1<=9&&y+1<=9) { //右下
                vec.at(y+1).at(x+1)++;
            }
        } else if (s==3) {
            vec.at(y).at(x)++;
            if (y-1>=0&&x-1>=0) { //左上
                vec.at(y-1).at(x-1)++;
            }
            if (y-1>=0) { //上
                vec.at(y-1).at(x)++;
            }
            if (y-1>=0&&x+1<=9) { //右上
                vec.at(y-1).at(x+1)++;
            }
            if (x-1>=0) { //左
                vec.at(y).at(x-1)++;
            }
            if (x+1<=9) { //右
                vec.at(y).at(x+1)++;
            }
            if (x-1>=0&&y+1<=9) { //左下
                vec.at(y+1).at(x-1)++;
            }
            if (y+1<=9) { //下
                vec.at(y+1).at(x)++;
            }
            if (x+1<=9&&y+1<=9) { //右下
                vec.at(y+1).at(x+1)++;
            }
            if (y-2>=0) { //最上
                vec.at(y-2).at(x)++;
            }
            if (x+2<=9) { //最右
                vec.at(y).at(x+2)++;
            }
            if (x-2>=0) { //最左
                vec.at(y).at(x-2)++;
            }
            if (y+2<=9) { //最下
                vec.at(y+2).at(x)++;
            }
        }
    }
    int count=0;
    int max=0;
    for (int i=0;i<10;i++) {
        for (int j=0;j<10;j++) {
            if (vec.at(i).at(j)==0) {
                count++;
            }
            if (vec.at(i).at(j)>max) {
                max=vec.at(i).at(j);
            }
        }
    }
    cout<<count<<endl;
    cout<<max<<endl;
}

