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

int main(){
	
	int mp[10][10]={0};
	int dx[13]={0,0,1,0,-1,1,1,-1,-1,0,2,0,-2};
	int dy[13]={0,1,0,-1,0,1,-1,-1,1,2,0,-2,0};
	int x,y,s;
	int ans1=100,ans2=0;
	while(scanf("%d,%d,%d",&x,&y,&s)!=EOF){
		s=s*4+1;
		for(int i=0;i<s;i++){
			int X=x+dx[i];
			int Y=y+dy[i];
			if(0<=X && X<=9 && 0<=Y && Y<=9){
				if(mp[X][Y]==0)ans1--;
				mp[X][Y]++;
				ans2=max(ans2,mp[X][Y]);
			}
		}
	}
	cout<<ans1<<endl;
	cout<<ans2<<endl;
	
	return 0;
}
