import std.stdio;
import std.conv;
import std.string;
import std.typecons;
import std.algorithm;
import std.array;
import std.range;
import std.math;
import std.regex : regex;
import std.container;
import std.bigint;
import std.numeric;


void main()
{
  int n, m;
  readf("%s %s\n", &n, &m);
  long pen;
  int res;
  auto f = new int[](n+1);
  foreach (_; 0..m) {
    auto x = readln.chomp.split;
    auto p = x[0].to!int;
    if (x[1] == "WA" && f[p] != 1) {
      f[p] -= 1;
    } 
    if (x[1] == "AC" && f[p] != 1) {
      res++;
      pen -= f[p];
      f[p] = 1;
    }
  }
  writefln("%s %s", res, pen);
}
