import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] line = sc.nextLine().split(" ");
        int n = Integer.parseInt(line[0]);
        int m = Integer.parseInt(line[1]);
        boolean[] done = new boolean[n];
        int ac = 0, penalty = 0;
        int[] wa = new int[n];
        for(int i = 0; i < m; i++) {
            line = sc.nextLine().split(" ");
            int p = Integer.parseInt(line[0]);
            if(done[p-1]) continue;
            if(line[1].equals("AC")) {
                ac++;
                done[p-1] = true;
                penalty+=wa[p-1];
            } else if(line[1].equals("WA")) {
                wa[p-1]++;
            }
        }
        System.out.println(ac + " " + penalty);
    }
}
/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