#include<iostream>
#include<string>
using namespace std;

int main() {
	int n, m, state[100000] = {}, cc = 0, penalty = 0;

	cin >> n >> m;
	for(int i = 0; i < m; i++) {
		int p;
		string s;
		cin >> p >> s;
		if (state[p] == -1) continue;
		if (s == "AC") {
			penalty += state[p];
			cc++;
			state[p] = -1;
		} else {
			state[p]++;
		}
	}
	cout << cc << ' ' << penalty << endl;
	return 0;
}


