import java.util.Scanner;

public class Main {
  
    public static void main(String[] args) {
      
      Scanner sc = new Scanner(System.in);
      int N = sc.nextInt();
      int M = sc.nextInt();
      int[][] list = new int[N][2];//list[問題番号][0] == AC用//list[問題番号][1] == WA用
      int AC =0;//最終的なAC数を収める変数
      int WA =0;//最終的なWA数を収める変数
      for(int i = 0; i < M; i++){
        int num = sc.nextInt();
        String s = sc.next();
        if(s.equals("AC") && list[num-1][0]!=1){
          list[num-1][0] = 1;
          AC++;
          WA += list[num-1][1];//対象の問題の最終的なWAの数をWAに格納
        }else if(s.equals("WA") && list[num-1][0]!=1){
          list[num-1][1]++;
        }
      }      
      System.out.println(AC+" "+WA);
    }
}
/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