#include <iostream>

int main()
{
    int density[10][10] = {};
    int x, y, size;
    char comma;
    while (std::cin >> x >> comma >> y >> comma >> size) {
        switch (size) {
        case 3:
            if (x - 2 >= 0) ++density[x - 2][y];
            if (y - 2 >= 0) ++density[x][y - 2];
            if (x + 2 < 10) ++density[x + 2][y];
            if (y + 2 < 10) ++density[x][y + 2];
            // fall through
        case 2:
            if (x - 1 >= 0 && y - 1 >= 0) ++density[x - 1][y - 1];
            if (x - 1 >= 0 && y + 1 < 10) ++density[x - 1][y + 1];
            if (x + 1 < 10 && y - 1 >= 0) ++density[x + 1][y - 1];
            if (x + 1 < 10 && y + 1 < 10) ++density[x + 1][y + 1];
            // fall through
        case 1:
            if (x - 1 >= 0) ++density[x - 1][y];
            if (y - 1 >= 0) ++density[x][y - 1];
            if (x + 1 < 10) ++density[x + 1][y];
            if (y + 1 < 10) ++density[x][y + 1];
        }
        ++density[x][y];
    }

    int cnt = 0, max = 0;
    for (int i = 0; i < 10; ++i) {
        for (int j = 0; j < 10; ++j) {
            if (density[i][j] == 0) ++cnt;
            if (max < density[i][j]) max = density[i][j];
        }
    }
    std::cout << cnt << std::endl << max << std::endl;
}