import           Control.Monad
import qualified Control.Monad.ST            as ST
import qualified Data.ByteString.Char8       as BS
import           Data.List
import           Data.Maybe
import qualified Data.Vector.Unboxed         as V
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 -- ACs
  was <- VM.new n -- WAs
  VM.set acs (0::Int)
  VM.set was (0::Int)

  forM_ [1..m] $ \_ -> do
    [t, s] <- words <$> getLine
    let i = read t - (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 -- ACs
                       a1 <- VM.read ans 1 -- WAs
                       VM.write ans 0 (a0+1)
                       VM.write ans 1 (a1+wa)

  a0 <- VM.read ans 0
  a1 <- VM.read ans 1

  putStrLn $ show a0 ++ " " ++ show a1