object Main extends App {
  import scala.collection.mutable

  val Array(n, m) = scala.io.StdIn.readLine.split(" ").map(_.toInt)
  val ACseq: mutable.HashSet[Int] = new mutable.HashSet
  var wacnt = 0

  (1 to m).foreach { i =>
    val Array(p, s) = scala.io.StdIn.readLine.split(" ")
    val pp = p.toInt
    if (!ACseq.contains(pp)) {
      if (s == "AC") {
        ACseq.add(pp)
      } else {
        wacnt += 1
      }
    }
  }
  println(ACseq.size + " " + wacnt)
}
