'use strict';
const main = input => {
  const num = input[0].split(' ').map(val => parseInt(val));
  const n = num[0], m = num[1];
  let arr = [];
  let checkAC = new Array(n);
  let corr = 0, wron = 0;
  for(let i=0; i<m; i++) {
    let pS = input[i+1].split(' ');
    arr[i] = {p: parseInt(pS[0]), s: pS[1]};
  }
  // console.log(n, m, arr);
  for(let i=0; i<n; i++) {
    checkAC[i] = 0;
  }
  // console.log(checkAC);
  
  arr.map(val => {
    if (val.s == 'WA' && checkAC[val.p-1] == 0) {
      wron++;
      // console.log(val);
      
    }
    if (val.s == 'AC' && checkAC[val.p-1] == 0) {
      checkAC[val.p-1] = 1;
      corr++;
      // console.log(val);
      
    }
  })
  console.log(corr, wron);
  
}
main(require("fs").readFileSync("/dev/stdin", "utf8").split('\n'));