import Control.Monad
import Data.Maybe
import qualified Data.ByteString.Char8 as BS
import Data.List
import qualified Data.Vector.Unboxed.Mutable as VM

readInt = fst . fromJust . BS.readInt
readIntList = map readInt . BS.words
getInt = readInt <$> BS.getLine
getIntList = readIntList <$> BS.getLine

main = do
    [n, m] <- getIntList
    
    acs <- VM.new n
    VM.set acs (0 :: Int)
    was <- VM.new n
    VM.set was (0 :: Int)
    
    forM_ [1..m] $ \_ -> do
        [p, s] <- words <$> getLine
        let i = read p - 1 :: Int
        ac <- VM.read acs i
        if s == "AC"
            then VM.write acs i 1
            else when (ac == 0) $ do
                wa <- VM.read was i
                VM.write was i (wa + 1)

    ans <- VM.new 2
    VM.set ans (0 :: Int)
    
    forM_ [0..(n - 1)] $ \i -> do
        ac <- VM.read acs i
        wa <- VM.read was i
        when (ac > 0) $ do
            a0 <- VM.read ans 0
            VM.write ans 0 (a0 + 1)
            a1 <- VM.read ans 1
            VM.write ans 1 (a1 + wa)

    a0 <- VM.read ans 0
    a1 <- VM.read ans 1
    
    putStrLn $ show a0 ++ " " ++ show a1
