import java.util.ArrayDeque;
import java.util.List;
import java.util.Scanner;

class Submission {
  int id;
  boolean ac;
}

public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int M = sc.nextInt();
  
    Submission[] subs = new Submission[M];
    for (int i=0; i<M; i++) {
      int id = sc.nextInt();
      String ac = sc.next();
      subs[i] =  new Submission();
      subs[i].id = id - 1;
      subs[i].ac = "AC".equals(ac);  
    }
    
    boolean[] acs = new boolean[N];
    int[] penalties = new int[N];
    for (int i=0; i<N; i++) {
      acs[i] = false;
      penalties[i] = 0;
    }

    for (int i=0; i<M; i++) {
      Submission sub = subs[i];
      if (acs[sub.id]) {
        continue;
      } else if (sub.ac) {
        acs[sub.id] = true;
      } else {
        penalties[sub.id] += 1;
      }
    }

    int ac = 0;
    int penalty = 0;
    for (int i=0; i<N; i++) {
      if (acs[i]) {
        ac += 1;
        penalty += penalties[i];
      }
    }

    sc.close();
    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