{-# LANGUAGE ScopedTypeVariables #-}
import qualified Data.Vector.Unboxed as VU
import qualified Data.Vector.Unboxed.Mutable as VUM
import qualified Data.ByteString.Char8 as B
import Control.Monad
import Data.Char

step :: (Int, Int) -> (Bool, Int) -> (Int, Int)
step (ac, wa) (isAC, n)
  | isAC = (ac+1, wa+n)
  | otherwise = (ac, wa)

main = do
  [n, m] <- map read . words <$> getLine :: IO [Int]

  (acs :: VUM.IOVector Bool) <- VUM.replicate n False
  (was :: VUM.IOVector Int) <- VUM.replicate n 0

  replicateM_ m $ do
    bs <- B.getLine
    let Just (i, j) = B.readInt bs
    let res = B.unpack $ B.dropWhile isSpace j
    prev <- VUM.read acs (i-1)
    when (not prev && res == "AC") $ do 
      VUM.write acs (i-1) True
    when (not prev && res == "WA") $ do
      VUM.modify was (+1) (i-1)

  acs' <- VU.freeze acs
  was' <- VU.freeze was
  let (a,b) = VU.foldl' step (0,0) $ VU.zip acs' was'
  putStr $ show a
  putStr " "
  putStrLn $ show b
    
