function Main(input) {
	var lines = input.split("\n");
	var m = lines.length - 2
	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 separeted = new Array(100000)
	var ACcount = 0
	var WAcount = 0
	for(var i = 0; i <= m ; i++) {
		if(Array.isArray(separeted[Ps[i]])) {
			separeted[Ps[i]].push(Ss[i])
		} else {
			separeted[Ps[i]] = []
			separeted[Ps[i]].push(Ss[i])
		}
		
	}
	for(var i = 0 ; i < separeted.length ; i++){
		if(separeted[i]===undefined) continue
		var sep = separeted[i]
		for(var j = 0; j < sep.length; j++) {
			if(sep[j] === 'AC') {
				ACcount++
				break
			} else {
				WAcount++
			}
		}
	}
	console.log(ACcount, WAcount)
}

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