"use strict"
 const Main = (input) =>{
   let xs = input.trim().split('\n');
   let N = xs[0].split(' ')[0] -0;
   let M = xs[0].split(' ')[1] -0;
   let p =xs.slice(1).map(v=>v.split(' ')[0]);
   let s =xs.slice(1).map(v=>v.split(' ')[1]);
   
   let ans = 0;
   let pena = 0;
   let list = new Array(N);
   let miss = new Array(N);
   list.fill(0);
   miss.fill(0);
   
   for (let i=0; i<M; i++) {
    if (list[p[i]-1]){ //list[p[0]=1-1] list[0]=0 つまりfalseということ
    continue;//falseはここを飛ばす
    }
    if (s[i] === "AC"){　　　　　//ここの処理でACがあったらfor文を止める
      pena += miss[p[i]-1];//0
      ans++;
      list[p[i]-1] = 1;
    }
    else if (s[i] === "WA"){
      miss[p[i]-1]++;//+1
    }
  }
 
  console.log(ans + " " + pena);
 
  return;
}
 
Main(require("fs").readFileSync("/dev/stdin", "utf8"));

