import std.algorithm, std.array, std.conv, std.stdio, std.string;
void main()
{
    auto buf = readln.chomp.split;
    immutable nProblems = buf[0].to!size_t, mSubmissions = buf[1].to!size_t;
    auto
        penalties = new int[nProblems],
        accepted = new bool[nProblems];
    int totalPenalty;
    foreach (i; 0..mSubmissions)
    {
        buf = readln.chomp.split;
        immutable
            problem = buf[0].to!size_t - 1,
            status = buf[1];
        if (status == "WA")
        {
            penalties[problem] += 1;
        }
        else
        if (status == "AC")
        {
            if (accepted[problem])
                continue;
            accepted[problem] = true;
            totalPenalty += penalties[problem];
        }
        else assert (false);
    }
    "%d %d".writefln(accepted.sum, totalPenalty);
}
