#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;

#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for (int i = x; i < n; i++)
#define OP(m) cout << m << endl;
typedef long long ll;
typedef unsigned long long ull;

int main()
{
    int p[13][13] = {};
    int x, y, s;
    char c;
    int w = 0, dens = 0;

    while (cin >> x >> c >> y >> c >> s)
    {
        switch (s)
        {
        case 1:
            p[x][y]++;
            p[x + 1][y]++;
            p[x - 1][y]++;
            p[x][y + 1]++;
            p[x][y - 1]++;
            break;
        case 2:
            p[x][y]++;
            p[x + 1][y]++;
            p[x - 1][y]++;
            p[x][y + 1]++;
            p[x][y - 1]++;
            p[x + 1][y + 1]++;
            p[x - 1][y + 1]++;
            p[x - 1][y - 1]++;
            p[x + 1][y - 1]++;
            break;
        case 3:
            p[x][y]++;
            p[x + 1][y]++;
            p[x - 1][y]++;
            p[x][y + 1]++;
            p[x][y - 1]++;
            p[x + 1][y + 1]++;
            p[x - 1][y + 1]++;
            p[x - 1][y - 1]++;
            p[x + 1][y - 1]++;
            p[x + 2][y]++;
            p[x - 2][y]++;
            p[x][y + 2]++;
            p[x][y - 2]++;
            break;
        }
    }

    rep(i, 10)
    {
        rep(j, 10)
        {
            if (p[i][j] == 0)
            {
                w++;
            }
            if (p[i][j] >= dens)
            {
                dens = p[i][j];
            }
        }
    }
    OP(w)
    OP(dens)

    return 0;
}
