#include<stdio.h>
int main() {
  int n,m,i;
  scanf("%d %d",&n,&m);
  int pi,acnum,x = 0,warongnum[m + 1];
  char si;
  acnum = 0;
  for (i = 1;i <= m; i ++) {
    warongnum[i] = 0;
  }
  for (i = 1;i <= m;i ++) {
    scanf("%d %c",&pi,&si);
    if (&si == "AC") {
      acnum ++;
      x = x + warongnum[pi];
    }
    else {
      warongnum[pi] ++;
    }
  }
  printf("%d %d",&acnum,&x);
}
