fun main(args: Array<String>) {
    val (n, m) = readLine()!!.split(' ').map { it.toInt() }
    val status = BooleanArray(n){false}
    val wa = IntArray(n){0}
    var ac = 0L
    var penalty = 0L
    repeat(m) {
        val (p, s) = readLine()!!.split(' ')
        val q = p.toInt()-1
        if (!status[q]) {
            when(s) {
                "AC" -> {
                    status[q] = true
                    penalty += wa[q]
                    ac++
                }
                "WA" -> wa[q]++
            }
        }
    }
    println("$ac $penalty")
}
