fun main(args: Array<String>) {
  val (N, M) = readInts()
  val waCnt = Array(N) { 0 }
  val isAc = Array(N) { false }
  repeat(M) {
    val (P, S) = readStrings()
    val p = P.toInt() - 1
    if (S == "AC") {
      isAc[p] = true
    } else {
      if (!isAc[p]) waCnt[p]++
    }
  }
  var ac = 0
  var pn = 0
  for (i in 0 until N) {
    if (isAc[i]) {
      ac++
      pn += waCnt[i]
    }
  }
  println("$ac $pn")
}

fun readString() = readLine()!!
fun readStrings() = readString().split(" ")
fun readInt() = readString().toInt()
fun readInts() = readStrings().map { it.toInt() }
fun readLongs() = readStrings().map { it.toLong() }
