import sys



read = sys.stdin.read

readline = sys.stdin.readline



N, M = list(map(int, readline().split()))



WA = [0] * (N + 1)

AC = [False] * (N + 1)

for _ in range(M):

    p, S = readline().split()

    p = int(p)

    if AC[p]:

        continue



    if S == 'AC':

        AC[p] = True

    else:

        WA[p] += 1



for i in range(1, N + 1):

    if not AC[i]:

        WA[i] = 0



print((sum(AC), sum(WA)))

import sys



read = sys.stdin.read

readline = sys.stdin.readline



N, M = list(map(int, readline().split()))



WA = [0] * (N + 1)

wa = 0

AC = [False] * (N + 1)

for _ in range(M):

    p, S = readline().split()

    p = int(p)

    if AC[p]:

        continue



    if S == 'AC':

        AC[p] = True

        wa += WA[p]

    else:

        WA[p] += 1



print((sum(AC), wa))

import sys

read = sys.stdin.read
readline = sys.stdin.readline
N, M = list(map(int, readline().split()))
WA = [0] * (N + 1)
AC = [False] * (N + 1)
for _ in range(M):
    p, S = readline().split()
    p = int(p)
    if AC[p]:
        continue
    if S == "AC":
        AC[p] = True
    else:
        WA[p] += 1
for i in range(1, N + 1):
    if not AC[i]:
        WA[i] = 0
print((sum(AC), sum(WA)))

import sys

read = sys.stdin.read
readline = sys.stdin.readline
N, M = list(map(int, readline().split()))
WA = [0] * (N + 1)
wa = 0
AC = [False] * (N + 1)
for _ in range(M):
    p, S = readline().split()
    p = int(p)
    if AC[p]:
        continue
    if S == "AC":
        AC[p] = True
        wa += WA[p]
    else:
        WA[p] += 1
print((sum(AC), wa))

+wa = 0 +        wa += WA[p] -for i in range(1, N + 1): -    if not AC[i]: -        WA[i] = 0 -print((sum(AC), sum(WA))) +print((sum(AC), wa))