import std.algorithm;
import std.array;
import std.conv;
import std.math;
import std.range;
import std.stdio;
import std.string;

void main() {
  auto s = readln.strip.splitter;
  immutable int n = s.front.to!int;s.popFront;
  immutable int m = s.front.to!int;
  int problems, penalty;
  int[int] c;
  bool[int] d;
  foreach (qid; 0 .. m) {
    s = readln.strip.splitter;
    immutable int k = s.front.to!int;s.popFront;
    bool ac = s.front.front == 'A';
    if (ac) {
      auto ptr = k in d;
      if (ptr is null) {
        ++problems;
        int t = c.get (k, 0);
        penalty += t;
        d[k] = true;
      }
    } else {
      c[k] = c.get (k, 0) + 1;
    }
  }
  writeln (problems, ' ', penalty);
}

