import Control.Monad
import Data.Array.Unboxed
import Data.Array.IO
import Data.IORef

main = do
    [n,m] <- map read . words <$> getLine :: IO [Int]
    ans <- newArray (1, n) False :: IO (IOUArray Int Bool)
    fals <- newArray (1, n) 0 :: IO (IOUArray Int Int)
    cs <- newIORef (0 :: Int)
    fs <- newIORef (0 :: Int)

    let
        solve :: IO () 
        solve =
            replicateM_ m $ do
                [p, s] <- words <$> getLine
                let pi = read p :: Int
                a <- readArray ans pi
                f <- readArray fals pi
                if (not a) && (s == "WA") 
                    then writeArray fals pi (f+1)
                else if (not a) && (s == "AC")
                    then writeArray ans pi True
                else return ()

        res :: IO ()
        res = 
            forM_ [1..n] $ \i -> do
                a <- readArray ans i
                f <- readArray fals i
                when a $ do
                    modifyIORef cs (+1) 
                    modifyIORef fs (+f) 

    solve
    res
    readIORef cs >>= \c -> putStr $ show c
    putStr " "
    readIORef fs >>= \f -> putStrLn $ show f
