function Main(input) {
    fins = [];
    right = 0;
    left = 0;
    input = input.split("\n");
    a = input[0].split(" ");
    N = Number(a[0]);
    M = Number(a[1]);
    input.shift();
    for(var i = 0;i < N; i++){
        fins.push(0);
    }
    for(var j = 0;j < M; j++){
        target = input[j].split(" ");
        N = target[0];
        result = target[1];
        if(fins[N] === 1) continue;
        if(result === "WA") left++;
        else{
            right++;
            fins[N] = 1;
        }
    }
    console.log(right,left);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));