import core.bitop, std.algorithm, std.ascii, std.bigint, std.conv,
    std.functional, std.math, std.numeric, std.range, std.stdio, std.string,
    std.random, std.typecons, std.container;

ulong MAX = 1_000_100, MOD = 1_000_000_007, INF = 1_000_000_000_000;
alias sread = () => readln.chomp();
alias lread(T = long) = () => readln.chomp.to!(T);
alias aryread(T = long) = () => readln.split.to!(T[]);
alias Pair = Tuple!(string, "x", long, "y");
alias PQueue(T, alias less = "a<b") = BinaryHeap!(Array!T, less);

void main()
{
    long n, m;
    scan(n, m);
    long[long] AC;
    long[long] WA;
    long accnt, wacnt;
    foreach (_; iota(m))
    {
        long p;
        string s;
        scan(p, s);
        if (s == "AC")
        {
            if (p in AC)
                continue;
            else
                AC[p] = 1;
        }
        else
        {
            if (p in AC)
            {
                continue;
            }
            else
            {
                if (p in WA)
                    WA[p]++;
                else
                    WA[p] = 1;
            }
        }
    }
    foreach (i; iota(n))
    {
        if ((i + 1) in AC)
        {
            accnt++;
            if ((i + 1) in WA)
                wacnt += WA[i + 1];
        }
    }
    writefln("%s %s", accnt, wacnt);
}

void scan(TList...)(ref TList Args)
{
    auto line = readln.split();
    foreach (i, T; TList)
    {
        T val = line[i].to!(T);
        Args[i] = val;
    }
}
