import java.util.*;

class Main {
    final Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        new Main().run();
    }

    private void run() {
        int n = sc.nextInt();
        int m = sc.nextInt();

        List<Problem> list = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            list.add(new Problem());
        }

        for (int i = 0; i < m; i++) {
            int num = sc.nextInt();
            String result = sc.next();
            Problem p = list.get(num-1);
            if (result.equals("AC")) {
                p.isAc = true;
            } else if (p.isAc == false) {
                p.submit++;
            }
        }

        int acNum = 0;
        int waNum = 0;
        for (int i = 0; i < n; i++) {
            Problem p = list.get(i);
            if (p.isAc) {
                acNum++;
                waNum += p.submit;
            }
        }
        System.out.printf("%d %d", acNum, waNum);
    }

    class Problem {
        int submit = 0;
        boolean isAc = false;
    }
}

/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