function main(input){
    input = input.split('\n');
    inputA =input[0].split(' ') ;
    inputN = inputA[0];
    inputM = inputA[1];
    inputB = Array(inputM);
    AClog = Array(inputM);
    ans = 0;
    pnr = 0;
    next = 0;

    for (var i = 1; i <= inputM; i++) {
	    inputB[i-1] = input[i].split(' ');	//0～9
    }

      for(i = 0; i < inputM; i++ ){
        for(q = 0; q < ans; q++ ){
            if(AClog[q] == inputB[i][0]){
                next = 1;
            }
        }
        if(next==0){
            if(inputB[i][1]=='WA'){
                pnr = pnr + 1;
            }
            else if(inputB[i][1]=='AC'){
                AClog[ans]=inputB[i][0];
                ans = ans + 1;
            }
        }
        next=0;    
    }

    console.log(ans+' '+pnr);
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));