"use strict"
function main(arg) {
    var src = arg.trim().split("\n")[0].split(' ').map(Number)
    var n = src[0]
    var m = src[1]
    var p = arg.trim().split("\n")
    p.shift()
    var maps = {}
    for (var i = 0; i < p.length; i++) {
        var row = p[i].split(" ")
        if (!maps[row[0]]) {
            maps[row[0]] = {
                'WA': 0,
                'AC': 0,
            }
        }
        // 間違い
        if (row[1] === 'WA' && maps[row[0]]['AC'] !== 1) {
            maps[row[0]]['WA'] += 1
        }
        // 正解
        if (row[1] === 'AC' && maps[row[0]]['AC'] === 0) {
            maps[row[0]]['AC'] = 1
        }
    }
    var WA = 0
    var AC = 0
    for (var obj in maps) {
        // console.log(JSON.stringify(maps[obj]))
        if (maps[obj]['AC'] === 1) {
            AC++
            WA += maps[obj]['WA']
        }
    }
    // console.log(JSON.stringify(maps,null,"\t"))
    console.log(AC + " " + WA)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));