#define _USE_MATH_DEFINES
 
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <vector>
#include <cmath>

using namespace std;

void small(int kami[10][10], int x, int y){
	kami[y][x]++;
	if(x-1>=0){
		kami[y][x-1]++;
	}
	if(x+1<=9){
		kami[y][x+1]++;
	}
	if(y-1>=0){
		kami[y-1][x]++;
	}
	if(y+1<=9){
		kami[y+1][x]++;
	}
}

void middle(int kami[10][10], int x, int y){
	if(x-1>=0 && y-1>=0){
		kami[y-1][x-1]++;
	}
	if(x-1>=0 && y+1<=9){
		kami[y+1][x-1]++;
	}
	if(x+1<=9 && y-1>=0){
		kami[y-1][x+1]++;
	}
	if(x+1<=9 && y+1<=9){
		kami[y+1][x+1]++;
	}
}

void large(int kami[10][10], int x, int y){
	if(x-2>=0){
		kami[y][x-2]++;
	}
	if(x+2<=9){
		kami[y][x+2]++;
	}
	if(y-2>=0){
		kami[y-2][x]++;
	}
	if(y+2<=9){
		kami[y+2][x]++;
	}
}

int main(){
	int kami[10][10]={0};
	char c;
	int x, y, s;

	while( cin>> x >> c >> y >> c >> s ){
		switch( s ){
		case 3:
			large(kami, x, y);
		case 2:
			middle(kami, x, y);
		case 1:
			small(kami, x, y);
		}
	}

	int max = 0;
	int count = 0;
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(kami[i][j]==0){
				count++;
			}else if(max<kami[i][j]){
				max=kami[i][j];
			}
		}
	}

	cout << count << endl;
	cout << max << endl;
	return 0;
}