#include<bits/stdc++.h>
#define re register
using namespace std;
bool v[100002];
char c[1002];
int num[100002];
signed main(){
int n,m,k,a,sum,ans1=0,ans2=0;
cin>>n>>m;
for(re int i=1;i<=m;++i){
	cin>>a>>c;
	if(v[a])continue;
	if(c[0]=='W')++num[a];
	else ++ans1,v[a]=1;
}
for(re int i=1;i<=n;++i)if(v[i])ans2+=num[i];
cout<<ans1<<" "<<ans2;
	}
