import java.lang.StringBuilder

fun main(arr:Array<String>) {
    val (n,m) = readLine()!!.split(" ").map { it.toInt() }
    val waCount = (1..n).map { 0 }.toMutableList()
    val acCount = (1..n).map { 0 }.toMutableList()
    (1..m).forEach {
        val (p,s) = readLine()!!.split(" ")
        val mon = p.toInt()-1
        if(s == "AC") {
            acCount[mon]++
        } else if(acCount[mon] > 0) {
        } else {
            waCount[mon]++
        }
    }
    var ansWa = 0
    var ansAc = 0
    (0 until n).forEach {
        if(acCount[it] > 0) {
            ansAc++
            ansWa += waCount[it]
        }
    }
    println("%s %s".format(ansAc, ansWa))
}
