fun main(args: Array<String>) {
    val (N, M) = listOfInt()
    val PS = mutableListOf<Pair<Int, String>>()
    for (m in 0 until M) {
        val (p, s) = listOfString()
        PS.add(Pair(p.toInt() - 1, s))
    }
    val AC = IntArray(N) { 0 }
    val WA = IntArray(N) { 0 }
    PS.forEach {
        val p = it.first
        val s = it.second
        if (AC[p] == 0) {
            if (s == "AC") AC[p] = 1
            else if (s == "WA") WA[p] += 1
        }
    }
    AC.forEachIndexed { index, ac -> if (ac == 0) WA[index] = 0 }
    println("${AC.sum()} ${WA.sum()}")
}
fun next() = readLine()!!
fun listOfString() = next().split(" ")
fun listOfInt(delta: Int = 0) = listOfString().map { Integer.parseInt(it) + delta }