void main()
{
    string[] tmp = rdRow!string;
    long n = tmp[0].to!long, m = tmp[1].to!long;
    long[] p = new long[m];
    string[] s = new string[m];
    foreach (i; 0 .. m)
    {
        tmp = rdRow!string;
        p[i] = tmp[0].to!long;
        s[i] = tmp[1];
    }

    bool[] actof = new bool[n+1];
    long[] wacnt = new long[n+1];

    foreach_reverse (i; 0 .. m)
    {
        if (s[i] == "AC")
        {
            actof[p[i]] = true;
            wacnt[p[i]] = 0;
        }
        else
        {
            ++wacnt[p[i]];
        }
    }

    long ac, wa;
    foreach (i; 1 .. n+1)
    {
        if (actof[i])
        {
            ++ac;
            wa += wacnt[i];
        }
    }

    writeln(ac, " ", wa);
}

T rdElem(T = long)()
{
    //import std.stdio : readln;
    //import std.string : chomp;
    //import std.conv : to;

    return readln.chomp.to!T;
}

alias rdStr = rdElem!string;

dchar[] rdDchar()
{
    //import std.conv : to;

    return rdStr.to!(dchar[]);
}

T[] rdRow(T = long)()
{
    //import std.stdio : readln;
    //import std.array : split;
    //import std.conv : to;

    return readln.split.to!(T[]);
}

T[] rdCol(T = long)(long col)
{
    //import std.range : iota;
    //import std.algorithm : map;
    //import std.array : array;

    return iota(col).map!(x => rdElem!T).array;
}

T[][] rdMat(T = long)(long col)
{
    //import std.range : iota;
    //import std.algorithm : map;
    //import std.array : array;

    return iota(col).map!(x => rdRow!T).array;
}

void wrMat(T = long)(T[][] mat)
{
    //import std.stdio : write, writeln;

    foreach (row; mat)
    {
        foreach (j, compo; row)
        {
            compo.write;
            if (j == row.length - 1) writeln;
            else " ".write;
        }
    }
}

import std.stdio;
import std.string;
import std.array;
import std.conv;
import std.algorithm;
import std.range;
import std.math;
import std.numeric;
import std.container;
import std.typecons;
import std.ascii;
import std.uni;