function Main(input) {
  input = input.trim()
  input = input.split("\n");
  var N = input[0].split(" ");
  var arr = new Array(N[0]-0).fill([0,"WA"]);
  input.shift();
  var wasum =0;
  for(var i=0;i<input.length;i++){
    var mem = input[i].split(" ");
    if(arr[mem[0]-1][1]=="WA"&&mem[1]=="WA"){
      arr[mem[0]-1][0]++;
    }else if(mem[1]=="AC"){
      arr[mem[0]-1][1] = "AC"
    }
  }
  var acsum = 0;
  for(var j=0;j<arr.length;j++){
  if(arr[j][1]=="AC"){
    wasum+=arr[j][0];
    acsum++;
                      
  }
  }
  console.log(acsum+" "+wasum);
}Main(require("fs").readFileSync("/dev/stdin", "utf8"));