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

T readNum(T)(){
  return readStr.to!T;
}

T[] readNums(T)(){
  return readStr.split.to!(T[]);
}

string readStr(){
  return readln.chomp;
}

void main(){
  auto nm = readNums!int;
  auto n = new int[](nm[0]);
    int penalty, cleared;
    
    foreach(i; 0 .. nm[1]){
        auto ps = readStr.split;
        if(ps[1] == "WA" && n[ps[0].to!int-1] >= 0){
            n[ps[0].to!int-1]++;   
        } else if(ps[1] == "AC" && n[ps[0].to!int-1] >= 0){
            penalty += n[ps[0].to!int-1];
            cleared++;
            n[ps[0].to!int-1] = -1;
        }
    }
    
    writeln(cleared, " ", penalty);
}
