let [|n;m|] = stdin.ReadLine().Split() |> Array.map int
if m=0 then stdout.WriteLine "0 0"
else
    let mutable ac = [1..n] |> List.map (fun x -> (x,0)) |> Map.ofList
    [1..m]
    |> List.map (fun _ -> (0,0))
    |> List.reduce (fun (acsum,wasum) _ ->
        let [|p;s|] = stdin.ReadLine().Split()
        match s with
        | "AC" ->
            let intp = int p
            ac <- ac.Add (intp,ac.[intp]+1)
            if ac.[intp]=1 then (acsum+1,wasum)
            else (acsum,wasum)
        | "WA" ->
            let intp = int p
            if ac.[intp]=0 then (acsum,wasum+1)
            else (acsum,wasum))
    |> fun (acsum,wasum) -> string acsum + " " + string wasum
    |> stdout.WriteLine