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

void main() {
    auto s = readln.split.map!(to!int);
    auto N = s[0];
    auto M = s[1];

    auto ok = new bool[](N);
    auto p = new int[](N);
    auto ans = 0;
    auto pena = 0;

    foreach (_; 0..M) {
        auto t = readln.split;
        auto a = t[0].to!int - 1;
        auto b = t[1];
        if (ok[a]) continue;
        if (b == "WA") {
            p[a] += 1;
        } else {
            ans += 1;
            pena += p[a];
            ok[a] = true;
        }
    }

    writeln(ans, " ", pena);
}