object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val N, M = sc.nextInt()
  val (acs, was) = LazyList
    .fill(M)(sc.nextInt() -> sc.next())
    .foldLeft((List.empty[Int], scala.collection.mutable.HashMap.empty[Int, Int])) {
      case ((acs, was), (p, "AC")) =>
        val firstCorrects = if (acs.contains(p)) acs else p :: acs
        firstCorrects -> was
      case ((acs, was), (p, "WA")) =>
        val penalty = if (acs.contains(p)) was else {
          val count = was.getOrElseUpdate(p, 0)
          was.update(p, count + 1)
          was
        }
        acs -> penalty
    }
  println(s"${acs.length} ${was.values.sum}")
}
