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