local n, m = io.read("*n", "*n", "*l")
local ac = {}
local wa = {}
for i = 1, n do
  ac[i] = false
  wa[i] = 0
end
for i = 1, m do
  local p, s = io.read():match("(%d+) (%w+)")
  p = tonumber(p)
  if s == "AC" then
    ac[p] = true
  else
    if not ac[p] then
      wa[p] = wa[p] + 1
    end
  end
end
local acc, wac = 0, 0
for i = 1, n do
  if ac[i] then
    acc = acc + 1
    wac = wac + wa[i]
  end
end
print(acc .. " " .. wac)
