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

int main() {
  int n, m;
  cin >> n >> m;
  
  int q;
  string s;
  set<int> ac;
  vector<int> wa(n+1, 0);
  for(int i=0; i<m; i++) {
    cin >> q >> s;
    if(ac.count(q)) continue;
    if(s=="AC") ac.insert(q);
    else wa[q]++;
  }
  
  for(int i=1; i<n+1; i++) if(!ac.count(i)) wa[i] = 0;
  cout << ac.size() << " " << accumulate(wa.begin(), wa.end(), 0) << 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(void){
   int N,M; 
   cin >>N>>M;
   bool AC[N];
   int WA[N];
  
   int WAsum=0;
   int ACsum=0;
   
   rep(i,N){
       WA[i]=0;
       AC[i]=false;
   }
   while(M>0){
       int p;
       string s;
       cin >> p>>s;
       M--;
       if(AC[p-1]==true){
           continue;
       }
       if(s=="AC"){
           WAsum+=WA[p-1];
           ACsum++;
           AC[p-1]=true;
           
       }
       else if(s=="WA"){
           WA[p-1]++;
       }
   }
   cout << ACsum << " "<< WAsum << endl;
  
}
