import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(); // 問題数
        int m = sc.nextInt(); // 提出回数
        Map<Integer,String> result = new TreeMap<>();
        Map<Integer,Integer> failure = new TreeMap<>();
        int successSum = 0;
        
        for(int i=0; i<m; i++){
            int p = sc.nextInt();
            String s = sc.next();
            if(s.equals("WA") && result.get(p)==null){
                if(failure.containsKey(p)){ 
                    failure.put(p, failure.get(p)+1);
                }
                else{
                    failure.put(p, 1);
                }
            }
            else if(s.equals("WA") && result.get(p).equals("AC")){
                // no done
            }
            else if(s.equals("AC") && result.get(p)==null){
                result.put(p, "AC");
                successSum++;
            }
            else{
                // no done
            }
        }
        
        int failureSum = 0;
        for(int i : failure.keySet()){
            if(result.get(i) != null){
                failureSum += failure.get(i);
            }
        }
        
        System.out.println(successSum + " " + failureSum);
    }
}
/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