import java.lang.Math
import kotlin.comparisons.*

val MOD: Int = 1000000000 + 7
val MODL: Long = MOD.toLong()

fun main(args: Array<String>)
{
    val (n, m) = read().split().toInt()
    val sub = mutableMapOf<Int, MutableList<String>>()
    for (i in 1..m) {
        val (p, s) = read().split()
        val pi = p.toInt()

        if (!sub.containsKey(pi)) sub.put(pi, mutableListOf(s))
        else sub[pi]!!.add(s)
    }

    var ac = 0
    var wa = 0
    for (key in sub.keys) {
        val idx = sub[key]!!.indexOf("AC")
        if (idx != -1) {
            ac++
            wa += idx
        }
        // var idx = -1
        // for (i in 0 until sub[key]!!.size) {
        //     if (sub[key]!![i] == "AC") {
        //         idx = i
        //         ac++
        //         wa +=
        //         break
        //     }
        // }
    }

    println("$ac $wa")
}

fun read(): String = readLine()!!
fun CharSequence.split(): List<String> = this.split(" ")
fun Iterable<String>.toInt(): List<Int> = this.map{it.toInt()}
fun Iterable<String>.toLong(): List<Long> = this.map{it.toLong()}
