function Main(input) {
  var inp = input.split('\n');
  var nums = inp[0].split(' ');
  var hyo = [];
  
  for (var i = 0; i < nums[0]; i++) {
    hyo[i] = [0, 0];
  }
  
  var current = 1;
  
  for (var i = 1; i <= nums[1]; i++) {
    var tmp = inp[i].split(' ');
    console.log(tmp);
    if (tmp[1] === 'WA' && tmp[0] != current) {
      hyo[tmp[0] - 1][0]++;
    } else if (tmp[1] === 'AC' && hyo[tmp[0] - 1][1] === 0) {
      hyo[tmp[0] - 1][1] = 1;
      current = tmp[0];
    }
  }
  
  var AC = 0;
  var WA = 0;
  
  for (var i = 0; i < hyo.length; i++) {
    for (var j = 0; j < hyo[i].length; j++) {
      if (j === 0) {
        WA += hyo[i][j];
      } else if (j === 1) {
        AC += hyo[i][j];
      }
    }
  }
  
  var ansString = AC + ' ' + WA;
  
  console.log(ansString);
  
}

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