#include <bits/stdc++.h>
using namespace std;
int main()
{
    int arr[100000], pen[100000], i;
    for(i =0; i< 100000; i++)
    {
        arr[i]=0;
        pen[i]=0;
    }
    int n, m, penal= 0, score =0, num;
    string s;
    scanf("%d %d", &n, &m);
    getchar();
    for(i =0; i<m; i++)
    {
        scanf("%d", &num);
        getchar();
        cin >> s;
        getchar();
        if(arr[num]==0)
        {
            if(s[0]=='W')
                pen[num]++;
            else
            {
                arr[num]=1;
                penal+=pen[num];
                score++;
            }
        }
    }
    printf("%d %d", score, penal);
    return 0;
}
