module practiceA
  sub Main(ByVal args() as String)
    dim n,m as integer
    dim arr(2) as string
    dim ac(100000) as integer
    dim wa(100000) as integer
    arr=Split(Console.ReadLine())
    n=arr(0):m=arr(1)
    dim i as integer
    dim pn as integer
    dim res as string
    dim good, bad as integer
    for i = 0 to n-1
    	ac(i) = 0
    	wa(i) = 0
  	next
    for i = 0 to m-1
	    arr=Split(Console.ReadLine())
    	pn=arr(0)-1:res=arr(1)
  		if res = "WA" and ac(pn) = 0 then
    		wa(pn) = wa(pn) + 1
    	end if
      	if res = "AC" then
        	ac(pn) = 1
    	end if
  	next
    for i = 0 to n-1
		good = good + ac(i)
		bad = bad + wa(i)*ac(i)
  	next
  Console.Write(good)
  Console.Write(" ")
  Console.Write(bad)
end sub
end module