/**
 * @param input string[][]
 */
function Main(input) {
  const psets = input.slice(1);

  const accepted = [];
  var penas = 0;

  var q, res;
  for (var i = 0; i < psets.length; i++) {
    q = psets[i][0];
    res = psets[i][1];

    if (accepted.indexOf(q) >= 0) continue;

    if (res === 'AC') {
      accepted.push(q);
    } else {
      penas++;
    }
  }

  const answer = '' + accepted.length + ' ' + penas;

  console.log(answer);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim()
  .split('\n')
  .map((v) => v.split(' '))
);
