#include <iostream>
#include <cstdio>

using namespace std;

int paper[14][14] = {0};

void drop(int n, int m, int l)
{
    paper[n + 2][m + 2]++;
    if (l == 3)
    {
        paper[n + 2][m]++;
        paper[n + 2][m + 4]++;
        paper[n][m + 2]++;
        paper[n + 4][m + 2]++;
    }
    if (l == 2)
    {
        paper[n + 3][m + 1]++;
        paper[n + 3][m + 3]++;
        paper[n + 1][m + 1]++;
        paper[n + 1][m + 3]++;
    }
    paper[n + 2][m + 1]++;
    paper[n + 2][m + 3]++;
    paper[n + 1][m + 2]++;
    paper[n + 3][m + 2]++;
    return;
}

int n, m, l;

int main()
{
    while (scanf("%d,%d,%d\n", &n, &m, &l) != EOF)
    {
        scanf("%d,%d,%d\n", &n, &m, &l);
        drop(n, m, l);
        /* for (int i = 2; i < 12; i++)
        {
            for (int j = 2; j < 12; j++)
            {
                printf(" %d", paper[i][j]);
            }
            printf("\n");
        } */
        n--;
    }

    int zero = 0, max = 0;
    for (int i = 2; i < 12; i++)
    {
        for (int j = 2; j < 12; j++)
        {
            if (paper[i][j] == 0)
            {
                zero++;
            }
            else if (paper[i][j] > max)
            {
                max = paper[i][j];
            }
        }
    }
    printf("%d\n%d\n", zero, max );
    return 0;
}
