// 🐋💭
import Foundation

func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

func readInt() -> Int {
    return Int(readLine()!)!
}


func main() {
    let nm = readInts()
    let (n, m) = (nm[0], nm[1])
    var aryQuestionNo = [String]()
    var aryJudge = [String]()
    for _ in 0..<m {
        let ps = readLine()!.split(separator: " ").map { String($0) }
        let (p, s) = (ps[0], ps[1])
        aryQuestionNo.append(p)
        aryJudge.append(s)
    }
    //____________________________________________________________________ここまで入力
    ///正答した問題の配列
    var aryAC = [String]()
    ///フラグ(ACであればTrue)
    var isAC = false
    var ACCount = 0
    var WACount = 0
    ///WAを数えるカウンター(ACが出た場合、WACounterに加算しリセットする)
    var counter = 0
    
    for i in 0..<m {
        isAC = aryJudge[i] == "AC"
        if isAC {
            if aryAC.firstIndex(of: aryQuestionNo[i]) == nil {
                aryAC.append(aryQuestionNo[i])
                ACCount += 1
            }
            WACount += counter
            counter = 0
        } else {
            counter += 1
        }
    }
    print(ACCount, WACount)
}


main()
