let () =
    let main () =
        let n, m = Scanf.scanf "%d %d" (fun n m -> n, m) in
        let penalty = Array.make n 0 in
        let ac = Array.make n false in
        for i = 1 to m do
            Scanf.scanf " %d %s" (fun p s ->
                let p = p - 1 in
                if s = "WA" then (if not ac.(p) then penalty.(p) <- penalty.(p) + 1) else ac.(p) <- true)
        done;
        let rec loop i cor pen =
            if i = n then cor, pen else
            let cor = if ac.(i) then cor + 1 else cor in
            let pen = if ac.(i) then (pen + penalty.(i)) else pen in
            loop (i + 1) cor pen
        in
        let cor, pen = loop 0 0 0 in
        Printf.printf "%d %d\n" cor pen
    in
    main ()