/* imports all std modules {{{*/
import
  std.algorithm,
  std.array,
  std.ascii,
  std.base64,
  std.bigint,
  std.bitmanip,
  std.compiler,
  std.complex,
  std.concurrency,
  std.container,
  std.conv,
  std.csv,
  std.datetime,
  std.demangle,
  std.encoding,
  std.exception,
  std.file,
  std.format,
  std.functional,
  std.getopt,
  std.json,
  std.math,
  std.mathspecial,
  std.meta,
  std.mmfile,
  std.net.curl,
  std.net.isemail,
  std.numeric,
  std.parallelism,
  std.path,
  std.process,
  std.random,
  std.range,
  std.regex,
  std.signals,
  std.socket,
  std.stdint,
  std.stdio,
  std.string,
  std.system,
  std.traits,
  std.typecons,
  std.uni,
  std.uri,
  std.utf,
  std.uuid,
  std.variant,
  std.zip,
  std.zlib;
/*}}}*/

/+---test
2 5
1 WA
1 AC
2 WA
2 AC
2 WA
---+/
/+---test
100000 3
7777 AC
7777 AC
7777 AC
---+/
/+---test
6 0
---+/

void main(string[] args) {
  long N, M;
  readf(" %d %d ", &N, &M);

  auto pen = new long[](N);
  auto ac  = new bool[](N);

  foreach (i; 0..M) {
    const x = readln.split.array;
    long p = x[0].to!long;
    string s = x[1].to!string;
    --p;

    if (!ac[p] && s == "WA") {
      ++pen[p];
    }
    ac[p] |= s == "AC";
  }
  "%d %d".writefln(ac.count(true), pen.sum);
}
