function Main(input) {
	var lines = input.split("\n");
	var m = lines[0].split(' ')[1]
	var Arr = lines.map((line, i) => {
		return i == 0 ? null : { idx : Number(line.split(" ")[0]), rs : line.split(" ")[1]}
	}).splice(1, m)
	var AClist = []
	var WAcount = 0
	Arr = Arr.sort((a, b) => a.idx - b.idx)
	for(var i = 0; i < Arr.length; i++) {
		if(Arr[i].rs === 'AC' && AClist[AClist.length - 1] !== Arr[i].idx) {
			AClist.push(Arr[i].idx)
		} else if(Arr[i].rs === 'WA' && AClist[AClist.length - 1] !== Arr[i].idx){
			WAcount++
		}
	}
	console.log(AClist.length, WAcount)
}

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