#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n,m;
    cin>>n>>m;
    int count[n+1];
    for(int i=0; i<n+1; i++) count[i]=0;
    int ac = 0;
    int nifty = 0;
    for(int i=0; i<m; i++)
        {
        int p;
        string s;
        cin>>p>>s;
        if(s=="AC" && count[p]!=-1)
         {
            ac++;
            nifty += count[p];
            count[p] = -1;
        }
        if(s=="WA" && count[p]!=-1) 
        {
            count[p]++;
        }
    }
    cout<<ac<<' '<<nifty<<endl;
    return 0;
}
