'use strict';

function main(input) {
  const args = input.split('\n');
  var results = new Map();
  var numberOfAccepted = 0;
  var numberOfPenalty = 0;
  for (let i = 1; i < args.length; ++i) {
    var numberOfProblem = args[i].split(' ')[0];
    var resultOfProblem = args[i].split(' ')[1];
    if (!results.has(numberOfProblem)) {
      results.set(numberOfProblem, resultOfProblem);
      if (resultOfProblem === 'AC') {
        ++numberOfAccepted;
      }
    }
    if (results.get(numberOfProblem) === 'WA') {
      if (resultOfProblem === 'WA') {
        ++numberOfPenalty;
      } else {
        ++numberOfAccepted;
        results.set(numberOfProblem, resultOfProblem);
      }
    }
  }
  console.log(numberOfAccepted + ' ' + numberOfPenalty);
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));