import scala.io.StdIn._

object Main extends App {


  val Array(n,m) = readLine().split(" ").map(_.toInt)
  val resultArr = Array.fill(m)(readLine().split(" "))
    .map(list => (list(0).toInt-1, list(1)))

  def solve() = {
    var cntAC = 0
    var cntWA = 0
    val historyArr = Array.fill(n, 2)(0)
    resultArr.foreach { case (p, s) =>
      if(s == "WA") {
        historyArr(p)(1) += 1
      } else if(s == "AC" && historyArr(p)(0) == 0) {
        cntAC += 1
        cntWA += historyArr(p)(1)
        historyArr(p)(0) = 1
      }
    }
    s"$cntAC $cntWA"
  }

  println(solve())

}

