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((
      scala.collection.mutable.HashMap.empty[Int, Unit],
      scala.collection.mutable.HashMap.empty[Int, Int])
    ) {
      case ((acs, was), (p, "AC")) =>
        if (!acs.contains(p)) acs.update(p, ())
        acs -> 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.size} ${was.filter { case (i, _) => acs.contains(i) }.values.sum}")
}
