local function read_a(n,m)m=m or 1 r={}for i=1,m do r[i]={}end for i=1,n do for j=1,m do r[j][i]=io.read"*n"end end return unpack(r)end
N=io.read"*n"
M=io.read"*n"
io.read()
p,S={},{}
for i=1,M do
p[i],S[i]=io.read():match"(%d+)%s+(%S+)"
p[i]=tonumber(p[i])
end

t={}
for i=1,M do
	if(t[p[i]])then
		if(t[p[i]]>0)then
			if(S[i]=="WA")then
				t[p[i]]=t[p[i]]+1
			else
				t[p[i]]=-t[p[i]]
			end
		end
	else
		if(S[i]=="WA")then
			t[p[i]]=1
		else
			t[p[i]]=0
		end
	end
end
ac,pn=0,0
for i=1,N do
	if(t[i])then
		if(t[i]<=0)then
			ac=ac+1
			pn=pn-t[i]
		end
	end
end
print(ac,pn)