#include <iostream>
using namespace std;

int main() {
    int x1, y1, size;
    char temp;
    int zeroDensity = 0, maxDensity = 0;
    int paper[10][10];

    for (int i = 0; i != 10; ++i) {
        for (int j = 0; j != 10; ++j) {
            paper[i][j] = 0;
        }
    }

    while (cin >> x1 >> temp >> y1 >> temp >> size) {
        switch (size) {
            case 1:
                paper[x1][y1]++;    // center
                paper[x1][y1-1]++;  // top
                paper[x1+1][y1]++;  // right
                paper[x1][y1+1]++;  // bottom
                paper[x1-1][y1]++;  // left
                break;
            case 2:
                for (int i = -1; i != 2; ++i) { paper[x1 + i][y1-1]++; }
                for (int i = -1; i != 2; ++i) { paper[x1 + i][y1]++; }
                for (int i = -1; i != 2; ++i) { paper[x1 + i][y1+1]++; }
                break;
            case 3:
                for (int i = -1; i != 2; ++i) { paper[x1 + i][y1-1]++; }
                for (int i = -1; i != 2; ++i) { paper[x1 + i][y1]++; }
                for (int i = -1; i != 2; ++i) { paper[x1 + i][y1+1]++; }
                paper[x1][y1-2]++;  // top
                paper[x1+2][y1]++;  // right
                paper[x1][y1+2]++;  // bottom
                paper[x1-2][y1]++;  // left
                break;
        }
    }

    for (int i = 0; i != 10; ++i) {
        for (int j = 0; j != 10; ++j) {
            if (paper[i][j] == 0) {
                ++zeroDensity;
            }
            if (paper[i][j] > maxDensity) {
                maxDensity = paper[i][j];
            }
        }
    }
    cout << zeroDensity << endl;
    cout << maxDensity << endl;
    return 0;
}