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

inline bool a(int y, int x){
  return (0<=x && x<=9 && 0<=y && y<=9);
}

int p[10][10];

void s1(int y, int x){
  p[y][x]++;
  if(a(y+1, x))p[y+1][x]++;
  if(a(y, x+1))p[y][x+1]++;
  if(a(y-1, x))p[y-1][x]++;
  if(a(y, x-1))p[y][x-1]++;
}

void s2(int y, int x){
  s1(y, x);
  if(a(y+1, x+1))p[y+1][x+1]++;
  if(a(y+1, x-1))p[y+1][x-1]++;
  if(a(y-1, x+1))p[y-1][x+1]++;
  if(a(y-1, x+1))p[y-1][x+1]++;
}

void s3(int y, int x){
  s2(y, x);
  if(a(y+2, x))p[y+2][x]++;
  if(a(y-2, x))p[y-2][x]++;
  if(a(y, x+2))p[y][x+2]++;
  if(a(y, x-2))p[y][x-2]++;
}

int main(){
  int x, y, z;
  int max=0, n=0;

  while(scanf("%d,%d,%d", &x, &y, &z)!=EOF){
    if(z==1)s1(y, x);
    if(z==2)s2(y, x);
    if(z==3)s3(y, x);
  }
  for(int i=0; i<10; i++){
    for(int j=0; j<10; j++){
      if(p[i][j]==0) n++;
      else if(max<p[i][j])max=p[i][j];
    }
  }
  cout << n << endl;
  cout << max << endl;

  return 0;
}