object Main {
    def main(args: Array[String]) = {
        import scala.io.StdIn.readLine
        var Array(n, m) = readLine.split(" ").map(_.toInt)
        var penalty: Array[Int] = new Array[Int](n)
        var done: Array[Int] = new Array[Int](n)

        for(i <- 0 until m) {
            var Array(idstring, ver) = readLine.split(" ")
            var id = idstring.toInt - 1
            ver match {
                case "AC" => done(id) = 1
                case "WA" => if( done(id) == 0 ) penalty(id) = penalty(id) + 1
                case _ =>  ;
            }
        }

        var ans: Int = 0; var pen: Int = 0
        for(i <- 0 until n) {
            ans = ans + done(i)
            if(done(i) == 1) pen = pen + penalty(i)
        }

        printf("%d %d\n", ans, pen)
    }
}