import std.stdio, std.conv, std.string, std.algorithm,
       std.math, std.array, std.container, std.typecons;

void main() {
  int n, m;
  readf("%d %d\n", &n, &m);
  auto ac = new bool[n];
  auto wa = new int[n];
  for(int i=0; i<m; i++) {
    auto pS = readln.chomp.split;
    auto pi = pS[0].to!int-1;
    auto Si = pS[1];
    if(Si=="AC") ac[pi] = true;
    else {
      if(!ac[pi]) wa[pi]++;
    }
  }
  int ac_count = 0, wa_count = 0;
  for(int i=0; i<n; i++) {
    if(ac[i]) {
      ac_count++;
      wa_count += wa[i];
    }
  }
  writef("%d %d\n", ac_count, wa_count);
}
