let arr=readLine()!.characters.split{$0==" "}.map{Int(String($0))!}
let ( n, m ) = ( arr[0], arr[1] )

var i = 0
var p = 0
var c = 0

var ac = Array(count: n, repeatedValue: 0)
var w = Array(count: n, repeatedValue: 0)
for i in 0..<m {
  let arr1=readLine()!.characters.split{$0==" "}.map{String($0)}
  
  var q: Int! = Int(arr1[0])! - 1
  if (ac[q] == 1 ) {
    continue
  }
  if (arr1[1] == "AC") {
    p += w[q]
    ac[q] = 1
    c += 1
    continue
  } else {
    w[q] += 1
  }  
}

print(c,p)