import java.util.Scanner;

public class Main {

	public static void main(String[] args) {


		Scanner sc = new Scanner(System.in);
		int problemCount = sc.nextInt();
		int teisyutuCount = sc.nextInt();

		int seitoCount = 0;
		int penaltyCountTotal = 0;

		boolean[] seitoList = new boolean[problemCount];
		int[] penaltyCount = new int[problemCount];

		for(int i =0;i < problemCount; i++) {
			seitoList[i] = false;
			penaltyCount[i] = 0;
		}

		for(int i = 0;i < teisyutuCount; i++) {
			int problemNo = sc.nextInt();
			String result = sc.next();

			if(seitoList[problemNo -1]) {
				// すでに正解している場合は何もしない
				continue;
			}else if(result.equals("AC")) {
				// 初めて正解した場合
				seitoCount++;
				seitoList[problemNo-1] = true;
				// これまでの不正解数を加える
				penaltyCountTotal += penaltyCount[problemNo-1];
			}else {
				// 不正解の場合
				penaltyCount[problemNo-1]++;
			}
		}

		System.out.println(seitoCount + " " + penaltyCountTotal);
	}
}

/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