import java.util.*

fun main(args: Array<String>) {
  val sc = Scanner(System.`in`)
  val N = sc.nextInt()
  val M = sc.nextInt()
  val po = BooleanArray(N + 1)
  val pena = IntArray(N + 1)
  Arrays.fill(pena, 0)
  for (i in 0 until M) {
    val p = sc.nextInt()
    val s = sc.next()
    if (s.equals("WA")) {
      if (!po[p]) {
        pena[p]++
      } else {
      }
    } else if (s.equals("AC")) {
      if (!po[p]) {
        po[p] = true
      }
    }
  }
  var penasum = 0
  var ans = 0
  for (i in 0..N) {
    if (po[i]) {
      ans++
      penasum += pena[i]
    }
  }

  System.out.println("$ans $penasum")
}

