function Main(input) {
  input = input.split("\n");
  var N = parseInt(input[0].split(" ")[0]);
  var M = parseInt(input[0].split(" ")[1]);
  input.shift();
  input.splice(M,input.length);
  var p = input.map(i => i.split(" "));
  var x = new Array(N+1);
  for(var i=0;i<N+1;i++){
    var xsub=new Array(2).fill(0);
    x[i]=xsub;
  }
  var ac=0;
  var wa=0;
  for(var i=0;i<M;i++){
    var a = parseInt(p[i][0]);
    var b = p[i][1];
    if(b=="WA"){
      x[a][1]++;
    }
    if(b=="AC"&&x[a][0]==0){
      ac++;
      wa+=x[a][1];
      x[a][0]++;
    }
  }
  var ans = ac + " " + wa;
  console.log('%s', ans);
  return ans;
}

function debug(n){
  var input = document.getElementById("input"+n).value;
  var ans=Main(input);
  var result="WA";
  if(ans==document.getElementById("output"+n).value.split("\n")[0]){
    result="AC";
  }
  document.getElementById("result"+n).innerHTML=result;
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));