import Control.Monad
import Data.Array
import qualified Data.ByteString.Char8 as BS
import Data.Char
import Data.List
import Data.Maybe

readInts :: IO [Integer]
readInts = map (fst . fromJust . BS.readInteger) . BS.words <$> BS.getLine

readStrings = BS.words <$> BS.getLine

splitBy :: (a -> Bool) -> [a] -> [[a]]
splitBy p [] = []
splitBy p xs = a : splitBy p (dropWhile p b)
  where
    (a, b) = break p xs

main :: IO ()
main = do
  (n:m:_) <- readInts
  p <- replicateM (fromIntegral m) (words <$> getLine)
  let b = solve p
   in putStrLn $(show . fst) b ++ " " ++ (show . snd) b

--  print $ solve p
solve :: [[String]] -> (Integer, Integer)
solve = f [] (0, 0)
  where
    f :: [String] -> (Integer, Integer) -> [[String]] -> (Integer, Integer)
    f _ (a, w) [] = (a, w)
    f ac (a, w) (x:xs)
      | notElem (head x) ac && (head . tail) x == "WA" = f ac (a, w + 1) xs
      | notElem (head x) ac && (head . tail) x == "AC" = f (head x : ac) (a + 1, w) xs
      | otherwise = f ac (a, w) xs