let [|n;m|] = stdin.ReadLine().Split() |> Array.map int
let ps = Array.init m (fun _ -> stdin.ReadLine().Split())

let f (x,y) str = if (x = 1) then (x,y)
                  elif (str = "AC") then (1,y)
                  else (x,y + 1)
let mutable arr = Array.init (n + 1) (fun _ -> (0,0))

for i in 0..(m - 1) do
 arr.[int ps.[i].[0]] <- f arr.[int ps.[i].[0]] ps.[i].[1]
 
let ans1 = arr |> Array.map (fun (x,y) -> x) |> Array.sum
let ans2 = arr |> Array.map (fun (x,y) -> y) |> Array.sum

(string ans1) + " " + (string ans2)
|>stdout.WriteLine