import Control.Monad
import Data.Maybe
import qualified Data.Map as M

main = do
    [n, m] <- map read <$> words <$> getLine
    m <- foldl update M.empty <$> map convert <$> map words <$> replicateM m getLine
    putStrLn $ show (M.size $ M.filter (>= 0) m) ++ " " ++ show (M.foldl (+) 0 $ M.map (max 0) m)

convert [i, r] = (read i, r)

update :: M.Map Int Int -> (Int, String) -> M.Map Int Int
update m (i, "AC") | v == Nothing    = M.insert i 0 m
                   | fromJust v >= 0 = m
                   | otherwise       = M.insert i (-(fromJust v)) m
  where
    v = M.lookup i m
update m (i, "WA") | v == Nothing    = M.insert i (-1) m
                   | fromJust v >= 0 = m
                   | otherwise       = M.insert i (fromJust v - 1) m
  where
    v = M.lookup i m