import java.io.{BufferedReader, InputStreamReader}

object Main {
  def main(args: Array[String]): Unit = {
    val in = new BufferedReader(new InputStreamReader(System.in))
    val Array(n, m) = in.readLine().split("\\s+").map(_.toInt)

    val pss = (1 to m).map { _ =>
      in.readLine().split("\\s+") match {
        case Array(p, s) => (p.toInt, s)
      }
    }

    var penalties = 0
    val acs = Array.ofDim[Boolean](n)

    pss.foreach {
      case (p, s) =>
        if (!acs(p-1)) {
          if (s == "AC") {
            acs(p-1) = true
          } else {
            penalties += 1
          }
        }
    }

    System.out.println(List(acs.count(x => x), penalties).mkString(" "))
  }
}
