#include<iostream>
#include<vector>
using namespace std;

int main(void){
  vector < vector <int> > square;
  square.resize(14);
  for(int i=0; (int)i<square.size(); i++){
    square[i].resize(14);
  }
  for(int i=0; i<(int)square.size(); i++){
    for(int j=0; j<(int)square[i].size(); j++){
      square[i][j] =0;
    }
  }

  int x, y, size;
  int min=0, max=0;

  while( cin >> y >> x >> size ){
    x+=2;
    y+=2;
    if(size>=1 && size<=3){
      square[x][y]++;
      square[x][y-1]++;
      square[x-1][y]++;
      square[x+1][y]++;
      square[x][y+1]++;
    }
    if(size==2 || size==3){
      square[x-1][y-1]++;
      square[x+1][y-1]++;
      square[x-1][y+1]++;
      square[x+1][y+1]++;
    }
    if(size==3){
      square[x][y-2]++;
      square[x-2][y]++;
      square[x+2][y]++;
      square[x][y+2]++;
    }
  }
  for(int i=2; i<(int)square.size()-2; i++){
    for(int j=2; j<(int)square[i].size()-2; j++){
      if( square[i][j]==0 ){
        min++;
      }else if(max < square[i][j]){
        max=square[i][j];
      }
    }
  }

  cout << min << endl << max << endl;

  return 0;
}