n, m = list(map(int, input().split()))



ac_set = set()

penalty = 0

wa_count = [0] * (n+1)



for i in range(m):

    p, s = input().split()

    p = int(p)



    if s == "AC":

        if not p in ac_set:

            penalty += wa_count[p]

            ac_set.add(p)

    elif s == "WA":

        wa_count[p] += 1





print((len(ac_set), penalty))
# coding: utf-8



import sys

input = sys.stdin.readline



n, m = list(map(int, input().split()))



ac_set = set()

penalty = 0

wa_count = [0] * (n+1)



for i in range(m):

    p, s = input().split()

    p = int(p)



    if s == "AC":

        if not p in ac_set:

            penalty += wa_count[p]

            ac_set.add(p)

    elif s == "WA":

        wa_count[p] += 1





print((len(ac_set), penalty))
n, m = list(map(int, input().split()))
ac_set = set()
penalty = 0
wa_count = [0] * (n + 1)
for i in range(m):
    p, s = input().split()
    p = int(p)
    if s == "AC":
        if not p in ac_set:
            penalty += wa_count[p]
            ac_set.add(p)
    elif s == "WA":
        wa_count[p] += 1
print((len(ac_set), penalty))

# coding: utf-8
import sys

input = sys.stdin.readline
n, m = list(map(int, input().split()))
ac_set = set()
penalty = 0
wa_count = [0] * (n + 1)
for i in range(m):
    p, s = input().split()
    p = int(p)
    if s == "AC":
        if not p in ac_set:
            penalty += wa_count[p]
            ac_set.add(p)
    elif s == "WA":
        wa_count[p] += 1
print((len(ac_set), penalty))

+# coding: utf-8 +import sys + +input = sys.stdin.readline