function Main(input) {
	var lines = input.split("\n");
	var words = lines[0].split(" ");
	var m = Number(words[1]);
	var Ps = lines.map((line, i) => i == 0 ? null : Number(line.split(" ")[0])).splice(1, m)
	var Ss = lines.map((line, i) => i == 0 ? null : line.split(" ")[1]).splice(1, m)

	var ACedProblems = []
	var penaltyCount = 0
	for(var i = 0 ; i < m ; i ++) {
		if(Ss[i] === 'AC' && ACedProblems.indexOf(Ps[i]) === -1) {
			ACedProblems.push(Ps[i])
		} else if(Ss[i] === 'WA' && ACedProblems.indexOf(Ps[i]) === -1) {
			penaltyCount++ 
		}
	}
	console.log(ACedProblems.length, penaltyCount)
}

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