import std.stdio, std.string, std.algorithm, std.array, std.range, std.conv,
    std.typecons, std.math, std.container, std.format, std.numeric;

void main(string[] args)
{
    long n, m;
    readf("%d %d\n", &n, &m);
    auto counts = new long[](n);
    long ac = 0;
    long wa = 0;
    foreach (_; 0 .. m)
    {
        long i;
        char[] s;
        readf("%d %s\n", &i, &s);

        if (counts[i - 1] == 0)
        {
            if (s == "AC")
            {
                counts[i - 1]++;
                ac++;
            }
            else
            {
                wa++;
            }
        }
    }
    writefln("%d %d", ac, wa);

}
