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

int n, m, hsh[100001];

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cin >> n >> m;
	int pen = 0, ac = 0;
	for(int i = 0; i < m; i++){
		int p;
		string s;
		cin >> p >> s;
		if(s == "AC" && hsh[p] != -1) ac++, pen += hsh[p], hsh[p] = -1;
		else if(hsh[p] != -1) hsh[p]++; 
	}
	cout << ac << " " << pen << "\n";
	return 0;
}