"use strict";
const fs = require('fs');
let input = fs.readFileSync(0).toString().split("\n").map((a) => a.split(" "));
const n = parseInt(input[0][0]);
const m = parseInt(input[0][1]);
const complete = Array(n).fill(false);
let correct = 0;
let penalties = 0;
const penaltiesDict = {};
input.slice(1).forEach((a) => {
	if (complete[parseInt(a[0]) - 1]) {
		return;
	}
	if (a[1] === "AC") {
		complete[parseInt(a[0]) - 1] = true;
		correct++;
		penalties += penaltiesDict[a[0]] || 0;
		delete penaltiesDict[a[0]];
		return;
	}
	if (typeof penaltiesDict[a[0]] === 'undefined') {
		penaltiesDict[a[0]] = 0;
	}
	penaltiesDict[a[0]]++;
});
console.log(correct + " " + penalties);