#include <bits/stdc++.h>
using namespace std;
int main(){
  
  int n,m; cin >> n>>m;
  
  vector<int> wa(n,0);
  int a;
  string s;
  
  int pen=0, ac=0;
  
  for(int i=0; i<m; i++){
    cin >> a >> s;
    if(s=="WA" && wa[a-1]!=-1){
      wa[a-1]++;
    }
    else if(s=="AC" && wa[a-1]!=-1){
      ac++;
      pen += wa[a-1];
      wa[a-1]= -1;
    }
  }
  cout << ac << " " << pen << endl;
}