object Main extends App{
val List(n,m) = readLine.split(" ").map(_.toInt).toList
var cnt = m
var map = scala.collection.mutable.HashMap.empty[Int,(Int,Int)]
while(cnt != 0){
    val List(p_str,s) = readLine.split(" ").toList
    val p = p_str.toInt
    if(!map.contains(p)){ // mapにpが存在しない時
        if(s == "AC") map += (p -> (0,1))
        else map += (p -> (1,0))
    }else{// mapにpが存在する時
        val e = map.get(p).get
        if(s == "AC" && e._2 == 0){
            map.update(p,(e._1,1))
        }else if(s == "WA" && e._2 == 0){
            map.update(p,(e._1 + 1,0))
        }else{            
        }
    }    
    cnt -= 1
}
var ac,wa = 0
map.foreach{
    case(k,v) =>
    if(v._2 == 1){
        ac += 1
        wa += v._1
    }
}
println(ac + " " + wa)
}