#include <bits/stdc++.h>
using namespace std;

int main()
{
	int n, m;
	cin >> n >> m;
	map<int, int> M;
	map<int, int> ACM;
	int p;
	string s;
	int WA = 0, AC = 0;
	for (int i = 0; i < m; ++i)
	{
		cin >> p >> s;
		if (s == "WA")
		{
			++M[p];
		}
		else if (s == "AC")
		{
			if (ACM[p] == 0)
			{
				ACM[p] = 1;
				WA += M[p];
				++AC;
			}
		}
	}
	cout << AC << " " << WA << endl;
	return 0;
}