import java.io.*;
import java.util.*;

public class Main{
    public static void main(String[] args)throws Exception{
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt(),m=sc.nextInt();
        boolean[] aw=new boolean[n];
        int[] ary=new int[n];
        int ac_c=0,wa_c=0;
        Arrays.fill(aw,false);
        Arrays.fill(ary,0);
        for(int i=0;i<m;i++){
            int p=sc.nextInt();
            String s=sc.next();
            if(s.equals("AC")){
                if(!aw[p-1]){
                    ac_c++;
                }
                aw[p-1]=true;
            }
            if(s.equals("WA")&&!aw[p-1]){
                ary[p-1]++;
            }
        }
        for(int i=0;i<n;i++){
            if(aw[i]){
                wa_c+=ary[i];
            }
        }
        System.out.println(ac_c +" "+ wa_c);
    }
}
/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