  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) (map BS.unpack . BS.words <$> BS.getLine)
    let b = solve p
     in putStrLn $(show . fst) b ++ " " ++ (show . snd) b
  
  solve :: [[String]] -> (Int, Int)
  solve = f (0, 0)
    where
      f (a, w) [] = (a, w)
      f (a, w) (x:xs)
        | (head . tail) x == "WA" = f (a, w + 1) xs
        | (head . tail) x == "AC" = f (a + 1, w) (filter (\l -> head l /= head x) xs)
