fun main(args: Array<String>) {
    val (n, m) = readLine()!!.split(" ").map { it.toInt() }
    var wa = IntArray(n){0};
    val ac = BooleanArray(n);
    repeat(m) {
        val l = readLine()!!.split(" ")
        val p = l[0].toInt()-1
        val isAc = l[1] == "AC";
        if(!isAc && !ac[p]) wa[p]++
        else if(isAc) ac[p] = true
    }
    println(""+ac.count { it } +" "+ wa.mapIndexed { i, x -> if(ac[i]) x else 0 }.sum())
}