function main(input) {
  var N = input[0].split(" ")[0]-0;
  var M = input[0].split(" ")[1]-0;
  var map = {};
  var ans = [0,0];
  for(var i=1;i<=M;i++){
    var p = input[i].split(" ")[0];
    var s = input[i].split(" ")[1];
    if(!map[p]){
      if(s=="AC"){
        ans[0]++;
        map[p] = true;
      }else{
        ans[1]++;
      }
    }
  }
  console.log(ans.join(" "));
}

main(require('fs').readFileSync('/dev/stdin', 'utf8').trim().split("\n"))
