let a_s, ws, m = Scanf.scanf "%d %d" @@ fun n m -> Array.(make n 0, make n 0, m)
let _ = for _ = 1 to m do Scanf.scanf " %d %s" @@ fun p s -> let p = p - 1 in if a_s.(p) = 0 then if s = "AC" then a_s.(p) <- 1 else ws.(p) <- ws.(p) + 1 done; Array.(Printf.printf "%d %d\n" (fold_left (+) 0 a_s) (fold_left (+) 0 ws))