'use strict'
function Main(lines) {
	var m = lines[0].split(' ')[1]
	var psets = lines.map((line, i) => {
		return i == 0 ? null : { idx : Number(line.split(" ")[0]), rs : line.split(" ")[1]}
	}).splice(1, m)
	var AClist = new Set()
	var WAcount = 0
	for(var i = 0; i < psets.length; i++) {
		if(psets[i].rs === 'AC' && !AClist.has(psets[i].idx)) {
			AClist.add(psets[i].idx)
		} else if(psets[i].rs === 'WA' && !AClist.has(psets[i].idx)){
			WAcount++
		}
	}
	console.log(AClist.size, WAcount)
}