#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <utility>
#include <cstring>
#include <iomanip>
#include <numeric>
#include <cmath>
#include <queue>
#include <map>
using namespace std;
typedef long long ll;
const int INF = 1<<30; 
const int MOD = 1e9 + 7;
const int dy[] = {1, 0, -1, 0};
const int dx[] = {0, 1, 0, -1};
const int ddy[] = {1, 0, -1, 0, 1, 1, -1, -1};
const int ddx[] = {0, 1, 0, -1, 1, -1, -1, 1};
const int dddy[] = {1, 0, -1, 0, 1, 1, -1, -1, 2, 0, -2, 0};
const int dddx[] = {0, 1, 0, -1, 1, -1, -1, 1, 0, 2, 0, -2};
bool range_check(int y, int x)
{
    if(y < 0 || x < 0 || y >= 10 || x >= 10) return false;
    else return true;
}
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int x, y, com;
    int table[10][10] = {};
    char bother;
    while(cin >> x >> bother >> y >> bother >> com)
    {
        table[y][x]++;
        if(com == 1)
        {
            for(int i = 0; i < 4; i++)
            {
                int ny = y + dy[i];
                int nx = x + dx[i];
                if(!range_check(ny, nx)) continue;
                table[ny][nx]++;
            }
        }
        if(com == 2)
        {
            for(int i = 0; i < 8; i++)
            {
                int ny = y + ddy[i];
                int nx = x + ddx[i];
                if(!range_check(ny, nx)) continue;
                table[ny][nx]++;
            }
        }
        if(com == 3)
        {
            for(int i = 0; i < 12; i++)
            {
                int ny = y + dddy[i];
                int nx = x + dddx[i];
                if(!range_check(ny, nx)) continue;
                table[ny][nx]++;
            }
        }
    }
    int cnt = 0, max_num = -INF;
    for(int i = 0; i < 10; i++)
    {
        for(int j = 0; j < 10; j++)
        {
            if(table[i][j] == 0) cnt++;
            max_num = max(table[i][j], max_num);
        }
    }
    cout << cnt << "\n" << max_num << endl;
    return 0;
}


