#include<iostream>
#include<string>
const int N = 1e5+1;
using namespace std;
int a[N];
bool o[N];
int main() {
	int n, m;
	cin >> n >> m;
	int ans, cnt;
	ans = cnt = 0;
	for (int i = 0;i < m;i++) {
		string s;
		int x;
		cin >> x >> s;
		if (o[x])continue;
		if (s == "WA") a[x]++;
		else if (s == "AC") {
			ans++;
			o[x] = true;
			cnt+=a[x];
		}
	}
	cout << ans << " " << cnt << endl;
	return 0;
}