"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 pa = arg.slice(1, M + 1);
    
    let ac = 0;
    let penalty = 0;
    
    const memo = [...Array(N)].fill(false);
    
    for(let i in pa) {
        const problem = parseInt(pa[i].split(" ")[0]);
        const answer  = pa[i].split(" ")[1];
        
        // まだ正解していなくてWAならペナルティ増やす
        if(!memo[problem - 1] && answer === "WA") {
            penalty++;
        }
        // まだ正解していなくてAC
        else if(!memo[problem - 1] && answer === "AC") {
            ac++;
            memo[problem - 1] = true;
        }
    }
    
    console.log(ac + " " + penalty);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));