import java.util.*

fun main(args: Array<String>) {
    val scn = Scanner(System.`in`)
    val N = scn.nextInt()
    val M = scn.nextInt()

    var WA = 0
    var AC = 0
    //var answer = mutableListOf<Int>()
    var answer = Array<Int>(N,{0})
    var wrong = Array<Int>(N,{0})

    for(i in 1 .. M){
        var p = scn.nextInt()
        val S = scn.next()

        if(p>N) continue
        if(answer[p-1]==1) continue

        if(S=="AC"){
            AC++
            WA += wrong[p-1]
            answer[p-1] = 1
        }else if(S=="WA"){
            wrong[p-1]++
        }
    }

    println("$AC $WA")
}