object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val n,m = sc.nextInt
  val seq = Seq.fill(m)((sc.nextInt, sc.next))
  
  def loop(seq: Seq[(Int, String)], ac: Int = 0, wa: Int = 0, done: Int = 0): Seq[Int] = {
    if (seq.isEmpty) Seq(ac, wa)
    else if (seq(0)._1 <= done) loop(seq.drop(1), ac, wa, done)
    else if (seq(0)._2 == "AC") loop(seq.drop(1), ac + 1, wa, seq(0)._1)
    else loop(seq.drop(1), ac, wa + 1, done)
  }
  
  println(loop(seq).mkString(" "))
}