#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;
int n,m,c[100005],i,ans1,ans2;
char s[10];
bool ok[100005];
int main()
{
	scanf("%d%d",&n,&m);
	while(m--)
	{
		scanf("%d%s",&i,s);
		if(s[0]=='A')
			ok[i]=true;
		else if(!ok[i])
			++c[i];
	}
	for(i=1;i<=n;++i)
		if(ok[i])
			++ans1,ans2+=c[i];
	printf("%d %d",ans1,ans2);	
	return 0;
}
