object Main extends App{
  import java.io.{BufferedOutputStream, BufferedReader, InputStreamReader, PrintWriter}
  val in=new BufferedReader(new InputStreamReader(System.in))
  val out = new PrintWriter(new BufferedOutputStream(System.out))
  val Array(n,m) = in.readLine().split(" ").map(_.toInt)
  val ac = scala.collection.mutable.HashMap[Int,Boolean]()
  var pe = 0
  for{i <- (0 until(m))}{
    val Array(p,s)=in.readLine().split(" ")
    if(ac.contains(p.toInt)){}
    else{
      if(s=="AC") ac(p.toInt) = true
      else pe += 1
    }
  }
  out.println(s"${ac.toSeq.size} ${pe}")
  out.flush()
}