// C - Welcome to AtCoder
#include <bits/stdc++.h>
using namespace std;

int wa_count[100000];

int main(){
	int n,m,p,ac=0,wa=0;
	char s[3];
	scanf("%d%d",&n,&m);
	while(m--){
		scanf("%d%s",&p,s); --p;
		if(wa_count[p] >= 0)// not ac
			if(s[0] == 'W') wa_count[p]++;
			else{
				ac++;
				wa += wa_count[p];
				wa_count[p] = -1;// ac flag on
			}
	}
	printf("%d %d\n",ac,wa);
}