import scala.collection.mutable

object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val N, M = sc.nextInt()
  val (acs, was) = List
    .fill(M)(sc.nextInt() -> sc.next())
    .foldLeft((mutable.HashMap.empty[Int, Int], mutable.HashMap.empty[Int, Int])) {
      case ((acs, was), (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 -> was
    }
  println(s"${acs.size} ${was.filter { case (i, _) => acs.contains(i) }.values.sum}")
}
