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

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