function Main(input) {
    var firstLine = input[0].split(/\s/);
    var N = parseInt(firstLine[0], 10);
    var M = parseInt(firstLine[1], 10);
    var PS = input.slice(1).map(ps => {
        var psArray = ps.split(/\s/);
        psArray[0] = parseInt(psArray[0], 10);
        return psArray;
    });

    var ACList = new Array(N);
    ACList.fill(0);
    var WAList = new Array(N);
    WAList.fill(0);

    for (var i = 0; i < M; i++) {
        if (ACList[PS[i][0] - 1] === 0) {
            if (PS[i][1] === 'AC') {
                ACList[PS[i][0] - 1] = 1;
            } else {
                WAList[[PS[i][0] - 1]]++;
            }
        }
    }

    var AC = 0;
    var WA = 0;
    for (var i = 0; i < ACList.length; i++) {
        AC += ACList[i];
        WA += ACList[i] === 1 ? WAList[i] : 0;
    }

    console.log(`${AC} ${WA}`);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim().split(/\n/));