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

int main() {
    int N, M;
    cin >> N >> M;
    vector<int> wa(N + 5, 0);
    for (int i = 0; i < M; i++) {
        int p;
        string s;
        cin >> p >> s;
        if (wa[p] >= 0 && s == "WA") wa[p]++;
        else if (wa[p] >= 0 && s == "AC") wa[p] = wa[p] * (-1) - 1;
    }
    int ac = 0, penalty = 0;
    for (auto a: wa){
        if (a < 0) {
            penalty += (a + 1) * (-1);
            ac++;
        }
    }
    cout << ac << " " << penalty << endl;
    return 0;
}
#include <bits/stdc++.h>

#define rep(i, n) for (int i = 0; i < (n); i++)

using namespace std;

using ll = long long;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  vector<int> wa(n), al(n);
  int ac = 0, pe = 0;
  while (m--) {
    int p;
    string s;
    cin >> p >> s;
    p--;
    if (s == "WA") {
      if (al[p] == 0) wa[p]++;
    } else {
      if (al[p] == 0) {
        pe += wa[p];
        ac++;
      }
      al[p] = 1;
    }
  }
  cout << ac << ' ' << pe;
  return 0;
}
