#include <iostream>

using namespace std;

int main()
{
    int map[10][10];
    int white = 0;
    int max_den = 0;
    int x, y, size;
    char comma;
    
    for (int i = 0; i < 10; i++) 
        for (int j = 0; j < 10; j++)
            map[i][j] = 0;

    while (cin >> x >> comma >> y >> comma >> size) {
        if (size == 1) {  // 小
            for (int i = -1; i <= 1; i++) {
                for (int j = -1; j <= 1; j++) {
                    if ((i == -1 && j == -1) || (i == 1 && j == -1) ||
                        (i == -1 && j == 1) || (i == 1 && j == 1)) 
                        continue;
                    
                    if ((x + i < 0) || (x + i > 9) || 
                        (y + j < 0) || (y + j > 9))
                        continue;

                    map[x + i][y + j]++;
                }
            }
        }
        else if (size == 2 || size == 3) {  // 中
            for (int i = -1; i <= 1; i++) {
                for (int j = -1; j <= 1; j++) {
                    if ((x + i < 0) || (x + i > 9) || 
                        (y + j < 0) || (y + j > 9))
                        continue;

                    map[x + i][y + j]++;
                }
            }
        }

        if (size == 3) {
            if (y >= 0 && y <= 9) {
                if (x - 2 >= 0 && x - 2 <= 9)
                    map[x - 2][y]++;
                if (x + 2 >= 0 && x + 2 <= 9)
                    map[x + 2][y]++;
            }
            if (x >= 0 && x <= 9) {
                if (y - 2 >= 0 && y - 2 <= 9)
                    map[x][y - 2]++;
                if (y + 2 >= 0 && y + 2 <= 9)
                    map[x][y + 2]++;
            }
        }
    }

    for (int i = 0; i < 10; i++)
        for (int j = 0; j < 10; j++) {
            if (map[i][j] == 0)
                white++;
            else
                max_den = max(max_den, map[i][j]);
        }

    cout << white << '\n' << max_den << endl;

    return 0;
}