#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m, i, j, num = 0, p = 0;
  cin >> n >> m;
  string st;
  vector<string> a(n + 6, "WA");
  for (i = 0; i < m; i++) {
    cin >> j;
    cin >> st;
    if (a[j] == "AC") {
    } else {
      if (st == "AC") {
        num++;
        a[j] = "AC";
      } else
        p++;
    }
  }
  cout << num << " " << p;
  return 0;
}
