#include<bits/stdc++.h>
using namespace std;
int main(){
	int n,m;
	cin>>n>>m;
	int arr[105000];
	bool bll[105000];
	int wc=0;
	int ac=0;
	for(int i=1;i<=n;i++){
		arr[i]=0;
		bll[i]=false;
	}
	while(m--){
		int p;
		string s;
		cin>>p>>s;
		if(bll[p])continue;
		if(s=="AC"){
			bll[p]=true;
			ac++;
			wc+=arr[p];
		}else if(s=="WA"){
			arr[p]++;
		}
	}
	cout<<ac<<" "<<wc<<endl;
	return 0;
}