#include <iostream>
#include <map>
#include <queue>
#include <cmath>
#include <vector>
#include <string>
#include <algorithm>
#include <functional>
using namespace std;
int N, M, P[1 << 18]; string S[1 << 18];
int flag[1 << 18], penalty[1 << 18];
int main() {
	cin >> N >> M;
	for (int i = 1; i <= M; i++) {
		cin >> P[i] >> S[i];
		if (S[i] == "AC") flag[P[i]] = 1;
		else if (flag[P[i]] == 0) penalty[P[i]]++;
	}
	int sum1 = 0, sum2 = 0;
	for (int i = 1; i <= N; i++) {
		sum1 += flag[i];
		if (flag[i] == 1) sum2 += penalty[i];
	}
	cout << sum1 << " " << sum2 << endl;
	return 0;
}