#include<iostream>
using namespace std;
struct prob
{
    int prob_no;
    int ac_count=0;
    int wa_count=0;
};
int main()
{
    int no;
    string verdict;
    int correct_ans=0;
    int penalties=0;
    int M,N;
    cin>>N>>M;
    prob arr[N];
    for(int i=0; i<M; i++)
    {
        cin>>no;
        cin>>verdict;
        arr[no-1].prob_no=no;
        if(verdict=="AC")
        {
            if(arr[no-1].ac_count==0)
            {
                penalties+=arr[no-1].wa_count;
                arr[no-1].ac_count++;
                correct_ans++;
            }
        }
        else
        {
            if(arr[no-1].ac_count==0)
            {
                arr[no-1].wa_count++;
            }
        }
    }
    cout<<correct_ans<<" "<<penalties<<endl;
    return 0;
}
