//HovalHaq!
#include <bits/stdc++.h>
using namespace std;
const int maxN = 1 << 20;

int A[maxN];

int main() {
	int n, m, c = 0, s = 0; cin >> n >> m;
	for(int i = 0; i < m; i++) {
		int x; cin >> x;
		string v; cin >> v;
		if(A[x] == -2) continue;
		if(v == "AC") c++, s += A[x], A[x] = -2;
		else A[x]++;
	}
	cout << c << " " << s;
}
