#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;
}

/***
coded by adarsh
***/

#include <bits/stdc++.h>
using namespace std;
typedef long long ll; 
typedef long double ld;
typedef vector<ll> vec; 
typedef vector<vector<ll>> vec2;
typedef pair<ll,ll> pair1;
typedef pair<string,ll> pair2;
typedef pair<ll,string> pair3;
typedef pair<string,string> pair4;
#define fl(i,a,b) for(i=a;i<b;i++)
#define rfl(i,a,b) for(i=b-1;i>=a;i--)
#define f first
#define s second

int main() 
{
    ios_base::sync_with_stdio(false); 
    cin.tie(NULL);
    ll n,m,i;cin>>n>>m;
    map<ll,ll> b;
    set<ll> a;ll c=0;
    fl(i,0,m)
    {
        ll p;string s;
        cin>>p>>s;
        if(a.count(p)==0&&s=="WA")
        {
            b[p]++;
        }
        else if(a.count(p)==0&&s=="AC")
        {
            c+=b[p];
            a.insert(p);
        }
    }
    cout<<a.size()<<" "<<c;
    return 0;
}
