'use strict'
const Main = (arg) => {
  let input = arg.trim().split('\n');
  let N = input[0].split(' ').map(Number)[0]; // 問題数
  let M = input[0].split(' ').map(Number)[1]; // 提出回数
  // console.log({ N, M });
  let Ans = [0, 0];
  let nWA = 0;
  let nAC = [];
  let kariWA = [];
  // let arr = [];
  for (let i = 1; i <= M; i++) {
    let currentN = input[i].split(' ');
    if (currentN[1] == 'AC' && nAC.indexOf(currentN[0]) == -1) {
      nAC.push(currentN[0]);

      for (let j = 0; j < kariWA.length; j++) {
        if (kariWA[j] == currentN[0]) {
          nWA += 1;
        }
      }
    } else if (currentN[1] == 'WA') {
      kariWA.push(currentN[0]);
    }
  }
  // console.log({ nAC, nWA, kariWA });
  console.log(nAC.length, nWA);


}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
