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

int main(){
  long long i,N,M,p,wa,ac;
  string s;
  cin>>N>>M;
  ac=wa=0;
  vector<long long> vec(N+1,0);
  vector<long long> vec_wa(N+1,0);

  for(i=0;i<M;i++){
    cin>>p>>s;  
    if(vec.at(p)!=0) continue;
    if(s=="AC"){
      ac++;
      wa+=vec_wa.at(p);
      vec.at(p)=1;
    }
    else{
      vec_wa.at(p)++;
    }
  }
  cout<<ac<<" "<<wa;
}