// 🐋💭
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 aryAC = [Bool](repeating: false, count: n)
    ///誤答した問題の数
    var aryWA = [Int](repeating: 0, count: n)
    
    for _ in 0..<m {
        let ps = readLine()!.split(separator: " ").map { String($0) }
        let (p, s) = (Int(ps[0])! - 1, ps[1])
        
        if s == "AC" {
            aryAC[p] = true
        }
        if !aryAC[p] {
            aryWA[p] += 1
        }
    }
    
    var ACCounter = 0
    var WACounter = 0
    for i in 0..<n{
        if aryAC[i] {
            ACCounter += 1
            WACounter += aryWA[i]
        }
    }
    print(ACCounter,WACounter)
}
    main()
