"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const N = parseInt(arg[0].split(" ")[0]);
    const M = parseInt(arg[0].split(" ")[1]);

    const PS = arg.slice(1, M + 1);
    
    const map = {};
    
    let score = 0;
    let pena  = 0;
    
    for(let i=0; i<M; i++) {
        const P = parseInt(PS[i].split(" ")[0]);
        const S = PS[i].split(" ")[1];
        
        if(!map[P] && S === "WA") {
            pena++;
        } else if(!map[P] && S ==="AC") {
            map[P] = "done";
            score++;
        }
    }
    
    console.log(score + " " + pena);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));