read
acc=0
wac=0
while read p s;do
	if [ $s = AC ];then
		if [ $[c[p]] -ge 0 ];then
			acc=$[acc+1]
			wac=$[wac+c[p]]
			c[p]=-1
		fi
	else
		if [ $[c[p]] -ge 0 ];then
			c[p]=$[c[p]+1]
		fi
	fi
done
echo $acc $wac
