function Main(arg)
{
  var tmp = arg.split("\n");
  var N = tmp[0].split(" ")[0] -0;
  var M = tmp[0].split(" ")[1] -0;
  var p = tmp.slice(1).map(v => v.split(" ")[0]);
  var s = tmp.slice(1).map(v => v.split(" ")[1]);
    
  var ans = 0;
  var pena = 0;
  var list = new Array(N);
  var miss = new Array(N);
  list.fill(0);
  miss.fill(0);

  for (var i = 0; i < M; i++)
  {
    
    if (list[p[i]-1]) continue;

    if (s[i] === "AC")
    {
      pena += miss[p[i]-1];
      ans++;
      list[p[i]-1] = 1;
    }
    else if (s[i] === "WA")
    {
      miss[p[i]-1]++;
    }
  }

  console.log(ans + " " + pena);

  return;
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));