import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;

public class Main {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt(), m = s.nextInt();
		Map<Integer,String> ac = new TreeMap<>();
		Map<Integer,String> wa = new TreeMap<>();
		Map<String, Integer> waMap = new HashMap<String, Integer>();
		int wrong = 0, accepted = 0;
		for(int i=0;i<m;i++) {
			int num = s.nextInt();
			String val = s.next();
			if (val.equals("AC")) {
				if (!ac.containsKey(num)) {
					accepted++;
					ac.put(num, val);
				}
			}else {
				if (waMap.containsKey(num+"WA")) {
					waMap.put(num+"WA", waMap.get(num+"WA") + 1);
				}else {
					waMap.put(num+"WA", 1);
				}
				if (!ac.containsKey(num)) {
					wrong++;
				}
				if (!wa.containsKey(num)) {
					wa.put(num, val);
				}
			}
		}
		for(Integer x : wa.keySet()) {
			if (!ac.containsKey(x)) {
				wrong -= waMap.get(x+"WA");
			}
		}
		System.out.println(accepted+" "+wrong);
	}
}

/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