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);
        i--;

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

}
