#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;

int main() {
  int n, m;
  cin >> n >> m;
  vector<int> p(m);
  vector<string> s(m);
  rep(i, m) cin >> p[i] >> s[i];
  rep(i, m) --p[i];

  vector<int> ac(n, 0), wa(n, 0);
  rep(i, m) {
    if (s[i] == "AC") ++ac[p[i]];
    else if (ac[p[i]] == 0) ++wa[p[i]];
  }

  int co = 0, pe = 0;
  rep(i, n) if (ac[i] > 0) {
    ++co;
    pe += wa[i];
  }
  printf("%d %d\n", co, pe);
  return 0;
}
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < n; i++)
typedef long long ll;

int main(){
    int n, m; cin >> n >> m;
    vector<vector<string>> v(n);
    rep(i, m){
        int a; cin >> a;
        string s; cin >> s;
        v.at(a-1).push_back(s);
    }
    int ac = 0, wa = 0;
    vector<int> v_wa(n);
    rep(i, n){
        bool flag = true;
        for(auto j : v.at(i)){
            if(j == "AC") {
                ac++;
                flag = false;
                break;
            }
            wa++;
        }
        if(flag) wa = 0;
        v_wa.at(i) = wa;
        wa = 0;
    }
    int sum = 0;
    for(auto a : v_wa) sum += a;
    cout << ac << ' ' << sum << endl;
    return 0;
}
