#include <iostream>
#include <string>
#include <cstring>
#include <vector>

using namespace std;

int main() {
    vector<vector<int>> paper(10, vector<int>(10));
    while (true) {
        string str;
        getline(cin, str);
        if (str.empty())break;

        char c[10];
        for (int i = 0; i < str.size(); i++)c[i] = str[i];
        int x = stoi(strtok(c, ","));
        int y = stoi(strtok(NULL, ","));
        int s = stoi(strtok(NULL, ","));

        switch (s) {
            case 1: {
                for (int i = 0; i < 10; i++) {
                    for (int j = 0; j < 10; j++) {
                        if (abs(x - i) + abs(y - j) <= 1)paper[i][j]++;
                    }
                }
                break;
            }
            case 2: {
                for (int i = -1; i <= 1; i++) {
                    for (int j = -1; j <= 1; j++) {
                        int nx = x + i, ny = y + j;
                        if (0 <= nx && nx < 10 && 0 <= ny && ny < 10)paper[nx][ny]++;
                    }
                }
                break;
            }
            case 3: {
                for (int i = 0; i < 10; i++) {
                    for (int j = 0; j < 10; j++) {
                        if (abs(x - i) + abs(y - j) <= 2)paper[i][j]++;
                    }
                }
                break;
            }
        }
    }

    int zero = 0, strong = 0;
    for (int i = 0; i < 10; i++) {
        for (int j = 0; j < 10; j++) {
            if (paper[i][j] == 0)zero++;
            strong = max(strong, paper[i][j]);
        }
    }
    cout << zero << endl << strong << endl;
    return 0;
}
