
function Main(arg)
{
 
  var N = arg.split("\n")[0].split(" ")[0] -0;
  var M = arg.split("\n")[0].split(" ")[1] -0;
  var PS = arg.split("\n").slice(1);
    
  var ans = 0;
  var pena = 0;
  var list = [];

  for (var i = 0; i < M; i++)
  {
    var p = PS[i].split(" ")[0];
    var s = PS[i].split(" ")[1];
    
    if (s === "AC" && list.indexOf(p) == -1)
    {
      ans++;
      list.push(p);
    }
    else if (s === "WA" && list.indexOf(p) == -1)
    {
      pena++;
    }
  }

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

  return;
}

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