#include <iostream>
#include <string>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <cmath>
#include <stack>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
using namespace std;

int main(){
    int x, y, s, ink[10][10] = {{0}};
    while (scanf("%d,%d,%d", &x, &y, &s) != EOF) {
    	if (s == 1){
    		ink[x][y]++;
    		if (x-1 >= 0) ink[x-1][y]++;
    		if (x+1 < 10) ink[x+1][y]++;
    		if (y-1 >= 0)ink[x][y-1]++;
    		if (y+1 < 10)ink[x][y+1]++;
    	} else if (s == 2){
    		for (int i = -1; i <= 1; i++)
    			for (int j = -1; j <= 1; j++)
    				if (x+i >= 0 && x+i < 10 && y+j >= 0 && y+j < 10) ink[x+i][y+j]++;
    	} else {
    		for (int i = -1; i <= 1; i++)
    			for (int j = -1; j <= 1; j++)
    				if (x+i >= 0 && x+i < 10 && y+j >= 0 && y+j < 10) ink[x+i][y+j]++;
    		if (x-2 >= 0) ink[x-2][y]++;
    		if (x+2 < 10) ink[x+2][y]++;
    		if (y-2 >= 0) ink[x][y-2]++;
    		if (y+2 < 10) ink[x][y+2]++;
    	}
    }
    int max = -1, ct = 0;
    REP(i, 10){
    	REP(j, 10){
    		if (max < ink[i][j]) max = ink[i][j];
    		if (ink[i][j] == 0) ct++;
    	}
    }

    cout << ct << endl << max << endl;
}
