#include <cstdio>
#include <string>
#include <iostream>
using namespace std;

typedef long long ll;

int n;
int m;
int MAX_N=100000;
int MAX_N=100000;
int p[100000];
string s[100000];
int ac[100000];
ll count[100000];

void solve();
int main(){
  scanf("%d",&n);
  scanf("%d",&m);
  for(int i=0;i<m;i++){
    scanf("%d",&p[i]);
    cin >> s[i];
  }
  for(int i=0;i<MAX_N;i++){
    ac[i]=0;
  }
  for(int i=0;i<MAX_N;i++){
    count[i]=0;
  }
  solve();
  return 0;
}

void solve(){
  for(int i=0;i<m;i++){
    int num = p[i];
    if(ac[num-1]==0){
      if(s[i]=="AC"){
        ac[num-1]=1;
      }
      else{
        count[num-1]+=1;
      }
    }
  }
  int total_ac=0;
  ll total_penalty=0;
  for(int i=0;i<n;i++){
    total_ac+=ac[i];
  }
  for(int i=0;i<n;i++){
    total_penalty=total_penalty+count[i];
  }
  printf("%d %ld\n",total_ac,total_penalty);
}