#include<stdio.h>
#include<string>
#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,m,i,a,ansa=0,answ=0;
	int vis[150000]={};
	string s;
	while(~scanf("%d%d",&n,&m))
	{
		for(i=0;i<m;i++)
		{
			scanf("%d",&a);
			cin>>s;
			if(s=="AC"&&!vis[a])
			{
				vis[a]=1;
				ansa++;
			}else if(s=="WA"&&!vis[a])
			{
				vis[a]=0;
				answ++;
			}
		}
		printf("%d %d\n",ansa,answ);
		answ=ansa=0;
		memset(vis,0,sizeof(vis));
	}
} 