import java.util.Scanner

object Main {
  def main(args: Array[String]): Unit = {
    //nextLineとnextを同時に使ったら死ぬ
    val sc = new Scanner(System.in)
    val n, m = sc.nextInt()
    val isAccepted = new Array[Boolean](n)
    isAccepted.map(_ -> false)
    val wa = new Array[Int](n)
    wa.map(_ -> 0)

    for (_ <- 0 until m) {
      val p = sc.nextInt()
      val s = sc.next()

      if (!isAccepted(p - 1)) {
        s match {
          case "AC" => isAccepted(p - 1) = true
          case "WA" => wa(p - 1) += 1
        }
      }
    }

    val ac = isAccepted.count(_ == true)
    val sumOfWa = isAccepted.zip(wa).foldLeft(0) {
      case (acc, (b, i)) => if (b) acc + i else acc
    }

    println(s"$ac $sumOfWa")

  }
  def debug(args: Any*): Unit = {
    Console.err.println(args.mkString(" "))
  }
}
