import java.util.*;

public class Main {
    public static void main(String[] args) {
        int N;
        int M;
        int[] waCnt=null;
        boolean[] acFlg = null;

        try (Scanner sc = new Scanner(System.in)) {
            N = sc.nextInt();
            M = sc.nextInt();
            waCnt = new int[N];
            acFlg = new boolean[N];

            for (int i = 0; i < M; i++) {
                int num = sc.nextInt();
                String rcwa = sc.next();
                if(acFlg[num-1]){
                    continue;
                }
                if(rcwa.equals("AC")){
                    acFlg[num-1] = true;
                }else{
                    waCnt[num-1]++;
                }
            }
        }
        int acResult = 0;
        int pena = 0;
        for (boolean b : acFlg){
            if(b){
                acResult++;
            }
        }
        for (int i = 0; i < N; i++) {
            if(!acFlg[i]){
                continue;
            }
            pena += waCnt[i];
        }
        System.out.println(acResult+" "+pena);
    }
}

/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz