#include <iostream>
#include <vector>
#include <algorithm>

#define INPUT_FROM_FILE (0) 
#if INPUT_FROM_FILE
#include <fstream>
#endif


void ink_small(int w, int h, std::vector<int> &image, int x, int y){
	image[y * w + x]++;

	if(y - 1 >= 0){
		image[(y - 1) * w + x]++;
	}
	if(y + 1 < h){
		image[(y + 1) * w + x]++;
	}
	if(x - 1 >= 0){
		image[y * w + x - 1]++;
	}
	if(x + 1 < w){
		image[y * w + x + 1]++;
	}

	return;
}

void ink_middle(int w, int h, std::vector<int> &image, int x, int y){

	ink_small(w, h, image, x, y);

	if((y - 1) >= 0){
		if((x - 1) >= 0){
			image[(y - 1) * w + x - 1]++;
		}
		if((x + 1) < w){
			image[(y - 1) * w + x + 1]++;
		}
	}
	if((y + 1) < h){
		if((x - 1) >= 0){
			image[(y + 1) * w + x - 1]++;
		}
		if((x + 1) < w){
			image[(y + 1) * w + x + 1]++;
		}
	}

	return;
}

void ink_large(int w, int h, std::vector<int> &image, int x, int y){
	ink_middle(w, h, image, x, y);

	if((y - 2) >= 0){
		image[(y - 2) * w + x]++;
	}
	if((y + 2) < h){
		image[(y + 2) * w + x]++;
	}
	if((x - 2) >= 0){
		image[y * w + x - 2]++;
	}
	if((x + 2) < w){
		image[y * w + x + 2]++;
	}

	return;
}

void print(int w, int h, const std::vector<int> &image){
	for(int y = 0; y < h; y++){
		int offset = y * w;
		for(int x = 0; x < w; x++){
			std::cout << image[offset + x];
		}
		std::cout << std::endl;
	}
	return;
}

int main(int argc, char **argv){
	int w = 10;
	int h = 10;
	std::vector<int> image(w * h, 0);
	int x, y, s;
	char tmp;
	int count_zero = 0;
	int max = 0;

#if INPUT_FROM_FILE
	std::ifstream ifs("test.txt");
	//FILE *fp = fopen("test.txt", "r");
#endif

#if INPUT_FROM_FILE
	while(ifs >> x >> tmp >> y >> tmp >> s){
#else
	while(std::cin >> x >> tmp >> y >> tmp >> s){
#endif
		
		if(s == 1){
			ink_small(w, h, image, x, y);
		}
		else if(s == 2){
			ink_middle(w, h, image, x, y);
		}
		else{
			ink_large(w, h, image, x, y);
		}

		//print(w, h, image);
	}

	for(int y = 0; y < h; y++){
		int offset = y * w;
		for(int x = 0; x < w; x++){
			int val = image[offset + x];
			if(val == 0){
				count_zero++;
			}
			max = std::max(max, val);
		}
	}

	std::cout << count_zero << std::endl;
	std::cout << max << std::endl;
	
	return 0;
}
