#include <stdio.h>
int n, m, x, y;
int ac[100000];
int wa[100000];
char s[10];
int main() {
	scanf("%d%d", &n, &m);
	for (int i = 0; i < m; i++) {
		scanf("%d", &x); x--;
		scanf(" %s", s);
		if (s[0] == 'A') {
			ac[x] = 1;
		}
		if (s[1] == 'A' && ac[x] == 0) {
			wa[x]++;
		}
	}
	x = 0;
	for (int i = 0; i < n; i++) {
		x += ac[i];
		if (ac[i])y += wa[i];
	}
	printf("%d %d\n", x, y);
}