"use strict"
function Main(input) {
  input = input.trim().split('\n');
  const N = input[0].trim().split(' ').map(Number)[0];
  const M = input[0].trim().split(' ').map(Number)[1];
  const P = input.slice(1, M+1);

  let ans = new Array();
  for(let i=0; i<N; i++){
    ans.push([0, 0]);
  }

  for(let i=0; i<M; i++){
    let p = P[i].trim().split(' ')[0];
    let S = P[i].trim().split(' ')[1];
    if(ans[p-1][0] === 1) continue;

    if(S === 'WA'){
      ans[p-1][1] += 1;
    } else {
      ans[p-1][0] += 1;
    }
  }

  let ac = 0;
  let wa = 0;
  for(let i=0; i<N; i++){
    if(ans[i][0] > 0) {
      ac += ans[i][0];
      wa += ans[i][1];
    }
  }
  console.log(ac, wa);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));