import scala.collection.mutable

object Main extends App {
  def f(answers: Seq[(Int, String)]): (Map[Int, Int], Map[Int, Int]) = {
    val acs, was = mutable.HashMap.empty[Int, Int]
    answers.foreach { case (p, result) =>
      if (!acs.contains(p)) result match {
        case "AC" => acs.update(p, 0)
        case "WA" => was.update(p, was.getOrElse(p, 0) + 1)
      }
    }
    (acs.toMap, was.toMap)
  }

  val sc = new java.util.Scanner(System.in)
  val N, M = sc.nextInt()
  val (acs, was) = f(List.fill(M)(sc.nextInt() -> sc.next()))
  println(s"${acs.size} ${was.filter { case (i, _) => acs.contains(i) }.values.sum}")
}
