#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,m;
	cin>>n>>m;
	map<pair<int,string >,int>m1;
	int penaltis = 0;
	int ac = 0;
	while(m--){
		int x;
		string s;
		cin>>x>>s;
		if(s == "WA"){
			if(m1[{x,"AC"}] == 0)
				m1[{x,s}]++;
		}else{
			if(m1[{x,s}] == 0){
				ac++;
				penaltis += m1[{x,"WA"}];
				m1[{x,s}]  = 1;
			}
		}
	}
	cout<<ac<<" "<<penaltis<<endl;
	return 0;
}
