import Control.Monad
import Data.Array

main = do
  li <- getLine
  let [n,m] = map read $ words li
  pss <- forM [1..m] (\_ -> do
    li <- getLine
    let [pi,si] = words li
    return (read pi, si == "AC")
    )
  let (s,p) = compute n m pss
  putStrLn $ unwords [show s, show p]

-- Left 続いているWAの数
-- Right 初めてのACまでのWAの数

compute :: Int -> Int -> [(Int,Bool)] -> (Int,Int)
compute n m pss = (length es, sum es)
  where
    ar = accumArray step (Left 0) (1,n) pss
    step (Left n) False = Left $ succ n
    step (Left n) True = Right n
    step r@(Right _) _ = r
    es = [ n | Right n <- elems ar ]
