'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 argsSplit = args[i].split(' ');
    var numberOfProblem = argsSplit[0];
    var resultOfProblem = argsSplit[1];
    if (!results.has(numberOfProblem)) {
      results.set(numberOfProblem, [resultOfProblem, 0]);
      if (resultOfProblem === 'AC') {
        ++numberOfAccepted;
      }
    }
    if (results.get(numberOfProblem)[0] === 'WA') {
      var tmp = results.get(numberOfProblem)[1];
      if (resultOfProblem === 'WA') {
        results.set(numberOfProblem, ['WA', tmp + 1]);
      } else {
        ++numberOfAccepted;
        numberOfPenalty += tmp;
        results.set(numberOfProblem, ['AC', tmp]);
      }
    }
  }
  console.log(numberOfAccepted + ' ' + numberOfPenalty);
}

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