import qualified Data.ByteString.Char8 as BS
import Data.Maybe (fromJust)
import qualified Data.IntSet as S

solve :: [(Int,String)] -> (Int,Int)
solve = go S.empty
  where
    go :: S.IntSet -> [(Int,String)] -> (Int,Int)
    go acs [] = (0,0)
    go acs ((p,s):xs)
      | p `S.member` acs && s == "AC"    = go acs xs
      | p `S.notMember` acs && s == "AC" = let (a,w) = go (S.insert p acs) xs
                                            in (a+1,w)
      | p `S.member` acs && s == "WA"    = let (a,w) = go acs xs
                                            in (a,w)
      | p `S.notMember` acs && s == "WA" = let (a,w) = go acs xs
                                            in (a,w+1)
main :: IO ()
main = do
    [n,m] <- map read . words <$> getLine :: IO [Int]
    ps <- map ((\[a,b] -> (read a,b)) . map BS.unpack . BS.words)
        . BS.lines <$> BS.getContents :: IO [(Int,String)]
    let (a,w) = solve ps
    putStr $ show a
    putStr " "
    print w