object Main extends App {
  
  val sc = new java.util.Scanner(System.in)
  val n, m = sc.nextInt()
  val a = Array.fill(m)((sc.nextInt, sc.next))
    .groupBy(_._1).map{ case (x, y) => x -> y.map(_._2)}
  val ans = (1 to n).foldLeft((0, 0))((ret, i) => {
    val ac = if (a.getOrElse(i, Array()).contains("AC")) ret._1 + 1 else ret._1
    val wa = ret._2 + a.getOrElse(i, Array()).takeWhile(_ != "AC").length
    (ac, wa)
  })
  val ac = ans._1
  val wa = ans._2
  println(s"$ac $wa")
}