#include <bits/stdc++.h>
using namespace std;

#define NL '\n'
#define xx first
#define yy second
#define pb push_back
#define mp make_pair
#define pii pair<int,int>
#define ones __builtin_popcount
#define si(x) scanf("%d",&x)
#define sl(x) scanf("%I64d",&x)
#define sd(x) scanf("%lf",&x)
#define ss(x) scanf("%s",x)
#define mem(a,b) memset(a,b,sizeof(a))
#define FOR(i,j,k) for(int i=j;i<=k;i++)
#define REV(i,j,k) for(int i=j;i>=k;i--)
#define READ(f) freopen(f,"r",stdin)
#define WRITE(f) freopen(f,"w",stdout)
#define debug(x) cerr << "debug = " << x << "\n";
#define debugs(s,x) cerr << "debug : " << s << " = " << x << "\n";
#define cnd tree[idx]
#define lnd tree[idx*2]
#define rnd tree[(idx*2)+1]
#define lndp (idx*2),(b),((b+e)/2)
#define rndp (idx*2+1),((b+e)/2+1),(e)
#define X real()
#define Y imag()
#define Point complex<long double>
#define pi 2.0*acos(0.0)
#define EPS 1e-9
#define INF INT_MAX
#define MOD 1000000007
#define MAX 100005

typedef long long LL;
typedef unsigned long long ULL;
typedef long double LD;


#include <bits/stdc++.h>
using namespace std;

#define NL '\n'
#define xx first
#define yy second
#define pb push_back
#define mp make_pair
#define pii pair<int,int>
#define ones __builtin_popcount
#define si(x) scanf("%d",&x)
#define sl(x) scanf("%I64d",&x)
#define sd(x) scanf("%lf",&x)
#define ss(x) scanf("%s",x)
#define mem(a,b) memset(a,b,sizeof(a))
#define FOR(i,j,k) for(int i=j;i<=k;i++)
#define REV(i,j,k) for(int i=j;i>=k;i--)
#define READ(f) freopen(f,"r",stdin)
#define WRITE(f) freopen(f,"w",stdout)
#define debug(x) cerr << "debug = " << x << "\n";
#define debugs(s,x) cerr << "debug : " << s << " = " << x << "\n";
#define cnd tree[idx]
#define lnd tree[idx*2]
#define rnd tree[(idx*2)+1]
#define lndp (idx*2),(b),((b+e)/2)
#define rndp (idx*2+1),((b+e)/2+1),(e)
#define X real()
#define Y imag()
#define Point complex<long double>
#define pi 2.0*acos(0.0)
#define EPS 1e-9
#define INF INT_MAX
#define MOD 1000000007
#define MAX 100005

typedef long long LL;
typedef unsigned long long ULL;
typedef long double LD;


int mod(string num, int a)
{
    // Initialize result
    int res = 0;

    // One by one process all digits of 'num'
    for (int i = 0; i < num.length(); i++)
         res = (res*10 + (int)num[i] - '0') %a;

    return res;
}
/*
int main()
{
    //READ("input.txt");
    //WRITE("out.txt");
    //mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
    //uniform_int_distribution<int>(0, 10000)(rng)
    //std::ios_base::sync_with_stdio(0);
LL n,s,c=0,p=0;
cin>>n>>s;
LL a;
string b;
bool checker[n+1]={false};
for(LL i=0;i<s;i++){
    cin>>a>>b;
    if(b=="AC" && checker[a]==false){
        checker[a]=true;
        c++;
    }
    else{
        if(b=="WA" && checker[a]==false )
            p++;
    }
}
cout<<c<<" "<<p<<endl;


    return 0;
}*/

const int maxn = 1e5 + 10;
int a[maxn];
map<int,int>maps;
map<int,int>::iterator it;
int n,m;
int ac = 0,wa = 0;
int main(void) {
    void solve();
    cin >> n >> m;
    ac = wa = 0;
    solve();
    return 0;
}
void solve() {
    if(m == 0) {
        cout << 0 << " " << 0 << endl;
        return ;
    }
    int num;
    string vis;
    for(int i = 1; i <= m; i ++) {
        cin >> num >> vis;
        if(maps[num] == -1) continue;
        if(vis == "AC") {
            wa += maps[num];
            ac += 1;
            maps[num] = -1;
            continue;
        }
        maps[num] ++;
    }
    maps.clear();
    cout << ac << " " << wa << endl;
    return ;
}









Measured memory_bytes: 4992