#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  int a[n + 1];
  memset(a, 0, sizeof(a));
  int ans1 = 0, ans2;
  while (m--) {
    int k;
    string s;
    cin >> k >> s;
    if (s == "WA") {
      if (a[k] == -1) {
      } else {
        a[k]++;
      }
    } else {
      if (a[k] != -1) {
        ans1 += 1;
        ans2 += a[k];
        a[k] = -1;
      }
    }
  }
  cout << ans1 << " " << ans2 << endl;
}
