{-# LANGUAGE OverloadedStrings #-}
import qualified Data.ByteString.Char8 as B
import qualified Data.IntSet           as S
import           Data.List             (foldl')
import           Data.Maybe            (fromJust)


parseLine :: B.ByteString -> (Int, B.ByteString)
parseLine s = (fst . fromJust $ B.readInt x1, x2)
  where [x1, x2] = B.words s

main :: IO ()
main = do
  [n, m] <- map read . words <$> getLine
  pss <- map parseLine . B.lines <$> B.getContents
  let (a, b) = solve n m pss
  putStrLn . unwords $ map show [a, b]

solve :: Int -> Int -> [(Int, B.ByteString)] -> (Int, Int)
solve _ _ pss = (a, b) where
  (a, b, _) = foldl' f (0, 0, S.empty) pss

f :: (Int, Int, S.IntSet) -> (Int, B.ByteString) -> (Int, Int, S.IntSet)
f (a, b, xs) (p, s)
  | S.member p xs = (a, b, xs)
  | s == "AC" = (a + 1, b, S.insert p xs)
  | s == "WA" = (a, b + 1, xs)
