import java.util.Scanner

fun main(args: Array<String>) {
	val scn = Scanner(System.`in`)
	val n = scn.nextInt()
	val m = scn.nextInt()
	val dict = mutableMapOf<Int, Pair<Boolean, Int>>()
	repeat(m){
		val p = scn.nextInt()
		val s = scn.next()
		if (!dict.containsKey(p)){
			dict[p] = Pair(false, 0)
		}
		val d = dict[p]!!
		when(s){
			"AC" -> {
				dict[p] = Pair(true, d.second)
			}
			"WA" -> {
				if (!d.first) dict[p] = Pair(d.first, d.second+1)
			}
		}
	}

	val fd = dict.filterValues { pair -> pair.first }
	print(fd.size.toString()+" "+fd.values.sumBy { pair -> pair.second })
}