// inputに入力データ全体が入る
function Main(input) {
  // 1行目がinput[0], 2行目がinput[1], …に入る
  input = input.split("\n");
  var n = Number(input[0].split(" ")[0]);
  var m = Number(input[0].split(" ")[1]);

  var countWA = 0;
  var score = {};
  var scoreCount = {};
  for (var i = 1; i <= m; i++) {
    var pi = Number(input[i].split(" ")[0]);
    var si = input[i].split(" ")[1];
    if (scoreCount[pi] === undefined) scoreCount[pi] = 0;
    if (score[pi] === undefined || score[pi] === "WA") {
      score[pi] = si;
      if (score[pi] === "WA") countWA++;
    }
    if (score[pi] === "WA") scoreCount[pi]++;
  }
  var countAC = 0;
  for (var element in score) {
    if (score[element] === "AC") countAC++;
    if (score[element] === "WA") countWA = countWA - scoreCount[element];
  }
  //出力
  console.log(countAC, countWA);
}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
