var f = [];

function main(){
  for(var i=-22;i<122;i++){
    f[i] = 0;// init
  }
  
  for(var i=0,len=input.length - 1;i<len;i++){
    eval("d"+input[i][4]+"("+input[i][0]+","+input[i][2]+");");
  }

  var nd=0;//not dropped
  var md=0;//most dropped
  for(var i=0;i<100;i++){
    if(f[i] == 0)
      nd++;
    if(f[i] > md)
      md = f[i];
  }

  console.log(nd);
  console.log(md);
}

function d1(x, y){
  f[(x + '' + y)-0]++;
  f[(x + '' + y)-0+1]++;
  f[(x + '' + y)-0-1]++;
  f[(x + '' + y)-0+10]++;
  f[(x + '' + y)-0-10]++;
}

function d2(x, y){
  d1(x, y);
  f[(x + '' + y)-0-10+1]++;
  f[(x + '' + y)-0-10-1]++;
  f[(x + '' + y)-0+10+1]++;
  f[(x + '' + y)-0+10-1]++;
}

function d3(x, y){
  d2(x, y);
  f[(x + '' + y)-0+2]++;
  f[(x + '' + y)-0-2]++;
  f[(x + '' + y)-0+20]++;
  f[(x + '' + y)-0-20]++;
}

var
input = '';

process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function(chunk) {
  input += chunk;
});
process.stdin.on('end', function() {
  input = input.split('\n');
  main();
});