import java.util.*

fun main(args: Array<String>) {
    val scanner = Scanner(System.`in`)
    val n = scanner.nextInt()
    val m = scanner.nextInt()
    val isSeikaiArray = BooleanArray(n)
    val penaArray = IntArray(n) { i -> 0 }
    var seikai = 0
    var pena = 0
    for (i in 0..m-1) {
        val p = scanner.nextInt() - 1
        val s = scanner.next()
        if (isSeikaiArray[p] == false) {
            if (s == "AC") {
                isSeikaiArray[p] = true
                seikai += 1
            } else {
                penaArray[p] += 1
            }
        }
    }


    for (i in 0..n-1) {
        if (isSeikaiArray[i]) pena += penaArray[i]
    }
    println("$seikai $pena")
}