
#include <iostream>
#include <algorithm>
#include <string>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <vector>
#include <queue>
#include <stack>
#include <cmath>
#include <map>
#include <iomanip>
#include <set>
#include <ctime>
#include <tuple>
#include <bitset>
#include <assert.h>
#include <deque>
#include <functional>
using namespace std;
typedef long long ll;

#define fi first
#define se second
#define rep(i, n) for (ll i = 0; i < n; i++)
#define debugA cerr << "AAAAA" << endl
#define debug_ cerr << "-------------" << endl
#define debug(x) cerr << #x << ": " << x << endl
#define debug_vec(v)                   \
    cout << #v << endl;                \
    for (int i = 0; i < v.size(); i++) \
    {                                  \
        cout << v[i] << " ";           \
    }                                  \
    cout << endl;
#define debug_vec2(v)                         \
    cout << #v << endl;                       \
    for (int i = 0; i < v.size(); i++)        \
    {                                         \
        for (int j = 0; j < v[i].size(); j++) \
        {                                     \
            cout << v[i][j] << " ";           \
        }                                     \
        cout << endl;                         \
    }

template <typename T>
bool chmax(T &a, const T &b)
{
    if (a < b)
    {
        a = b;
        return true;
    }
    return false;
}

template <typename T>
bool chmin(T &a, const T &b)
{
    if (a > b)
    {
        a = b;
        return true;
    }
    return false;
}

template <typename T>
void quit(T a)
{
    cout << a << endl;
    exit(0);
}

using Graph = vector<vector<int>>;
using P = pair<int, int>;
using P1 = pair<int, pair<int, int>>; // クラスカル法とかで、{cost, {from, to}}的に使う。
const ll LINF = 10010020030040056ll;
const int INF = 1001001001;
const double pi = acos(-1);

void MergeSort(vector<int> &a, int left, int right)
{
    if (right - left == 1)
        return;

    int mid = (right + left) / 2;
    MergeSort(a, left, mid);
    MergeSort(a, mid, right);
    int i = left;
    int j = mid;
    vector<int> tmp;
    while (true)
    {
        if (i == mid && j == right)
        {
            break;
        }
        else if (i == mid)
        {
            tmp.push_back(a.at(j));
            j++;
            continue;
        }
        else if (j == right)
        {
            tmp.push_back(a.at(i));
            i++;
            continue;
        }
        if (a[i] <= a[j])
        {
            tmp.push_back(a.at(i));
            i++;
        }
        else
        {
            tmp.push_back(a.at(j));
            j++;
        }
    }
    for (int i1 = left; i1 < right; i1++)
    {
        a.at(i1) = tmp.at(i1 - left);
    }
}

int main()
{
    int n, m;
    cin >> n >> m;
    vector<pair<int, int>> vec(n);
    for (int i = 0; i < n; i++)
    {
        vec[i] = {0, 0};
    }
    for (int i = 0; i < m; i++)
    {
        int a;
        string s;
        cin >> a >> s;
        a--;
        if (s == "WA" && vec[a].fi == 0)
        {
            vec[a].se++;
        }
        else if (s == "WA")
        {
            continue;
        }
        else
        {
            vec[a].fi++;
        }
    }
    int ac = 0;
    int wa = 0;
    for (int i = 0; i < n; i++)
    {
        if (vec[i].fi != 0)
        {
            ac++;
            wa += vec[i].se;
        }
    }
    cout << ac << " " << wa << endl;

    return 0;
}

#include <bits/stdc++.h>
#include <string>
//#define local
#ifdef local
#include "dbg-macro/dbg.h"
#endif
#define ll long long
#define pi (acos(-1))
#define rep(i, n) for (unsigned long long i = 0; i < (unsigned long long)(n); ++i)
using namespace std;
std::vector<unsigned ll> genprimevec(const unsigned ll N);


int main()
{
    int n, m;
    cin >> n >> m;
    vector<int> wavec(n, 0);
    vector<bool> aced(n, false);
    ll ac = 0;
    ll wa = 0;
    while (m--)
    {
        int p;
        string s;
        cin >> p >> s;
        if (aced[p]) { continue; }
        if (s == "AC")
        {
            aced[p] = true;
            ++ac;
            wa += wavec[p];
        }
        else
        {
            wavec[p]++; // WA
        }
    }

    cout << ac << ' ' << wa << endl;
    return 0;
}

ll extgcd(ll a, ll b, ll &x, ll &y)
{
    if (b == 0)
    {
        x = 1, y = 0;
        return a;
    }
    ll d = extgcd(b, a % b, y, x);
    y -= a / b * x;
    return d;
}


std::vector<unsigned ll> genprimevec(const unsigned ll N)
{
    std::vector<bool> is_prime(N + 1);
    for (unsigned ll i = 0; i <= N; i++) { is_prime[i] = true; }
    std::vector<unsigned ll> P;
    for (unsigned ll i = 2; i <= N; i++)
    {
        if (is_prime[i])
        {
            for (unsigned ll j = 2 * i; j <= N; j += i) { is_prime[j] = false; }
            P.emplace_back(i);
        }
    }
    return P;
}
