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,Int]()
  var pe = scala.collection.mutable.HashMap[Int,Int]()
  for{i <- (0 until(m))}{
    val Array(p,s)=in.readLine().split(" ")
    val j = p.toInt
    if(ac.contains(j)){}
    else{
      if(s=="AC") {
        ac(j) = if(pe.contains(j)) pe(j) else 0
      }
      else pe(j) = if(pe.contains(j)) pe(j) + 1 else 1
    }
  }
  var ans = 0
  ac.toSeq.map(r => ans += r._2)
  out.println(s"${ac.toSeq.size} ${ans}")
  out.flush()
}