import java.util.*

fun main(args:Array<String>){
    val (n,m) = readLine()!!.split(" ").map{it.toInt()}
    var sum = 0
    var pen = 0
    var a = HashSet<Int>()
    var b = IntArray(n)
    repeat(m){
        val (p,s) = readLine()!!.split(" ")
        if(s == "AC"){
            if(a.contains(p.toInt()) == false){
                sum++
                a.add(p.toInt())
            }
        }
        else{
            if(a.contains(p.toInt()) == false){
                b[p.toInt() - 1]++
            }
        }
    }
    for(i in 0 until n){
        if(a.contains(i + 1)){
            pen += b[i]
        }
    }
    println("${sum} ${pen}")
}
