//
// Created by aqib on 4/1/20.
//
#include <bits/stdc++.h>
#define fastIO ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
#define endl "\n"
using namespace std;
int main() {
    fastIO;
    int N, M;
    cin >> N >> M;
    long waCnt[100001] = {0};
    bool ac[100001];
    memset(ac, false, sizeof(ac));
    long long WAs = 0, ACs = 0;
    for (int i = 0; i < M; i++) {
        int serial;
        string res;
        cin >> serial;
        cin >> res;
        if (res == "AC" && !ac[serial]) {
            ac[serial] = true;
            ACs++;
            WAs += waCnt[serial];
        } else if (res == "WA" && !ac[serial]) {
            waCnt[serial]++;
        }
    }
    cout << ACs << " " << WAs << endl;
    return 0;
}
