#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define rep(i,a,b) for(i=a;i<b;i++)
ll int large=(ll int)1e13+7;
ll int mod=998244353;

struct node
{
   ll int fi,se;
};

bool compare(node x,node y)
{

}

ll int fib_n(ll int n)
{
    ll int i;
    ll int arr[n+5]={0};
    arr[0]=1;
    arr[1]=1;
    rep(i,2,n+1)
    arr[i]=(arr[i-1]+arr[i-2])%mod;
    return arr[n]%mod;
}

ll int mod_exp(ll int x,ll int n)
{
    ll int result=1;
    while(n>0)
    {
        if(n%2==1)
            result=(result*x)%mod;
        x=(x*x)%mod;
        n=n/2;
    }
    return result;
}

ll int mod_inverse(ll int a)
{
    return mod_exp(a,mod-2);
}

vector<ll int> all_prime_factors(ll int n)
{
    vector<ll int> res;
    ll int tempn=n;
    for (ll int i = 2; i * i <= n; ++i) {
        while (n % i == 0) {
            res.push_back(i);
            n /= i;
        }
    }
    if (n != 1&n!=tempn) {
        res.push_back(n);
    }
    return res;
}

set<ll int> distinct_prime_factors(ll int n)
{
    set<ll int> res;
    ll int tempn=n;
    for (ll int i = 2; i * i <= n; ++i) {
        while (n % i == 0) {
            res.insert(i);
            n /= i;
        }
    }
    if (n != 1&n!=tempn) {
        res.insert(n);
    }
    return res;
}

 //  THIS SEGMENT IS FOR FINDING WEATHER A NUMBER IS PRIME OR NOT BY SIEVE
/* bool is_prime[1000007];
void sieve()
{
         ll int N=1000006;
        for(ll int i = 0; i <= N;++i) {
            is_prime[i] = true;
        }
        is_prime[0] = false;
        is_prime[1] = false;
        for(int i = 2; i * i <= N; ++i) {
             if(is_prime[i] == true) {
                 for(int j = i * i; j <= N ;j += i)
                     is_prime[j] = false;
            }
        }
}                 */


//     THIS SNIPPET IS FOR GRAPH REPRESENTATION
//  vector<ll int>adj[100006];
/*
    ll int n,m;
     cin>>n>>m;
     rep(i,1,m+1)
     adj[i].clear();
     for(ll int i=1;i<=m;i++)
     {
         ll int a,b;
         cin>>a>>b;
         adj[a].pb(b);
         adj[b].pb(a);
     }

                                  */


//   THIS METHOD IS USED FOR SIMPLE DFS
//memset(visited,false,sizeof(visited));
// bool visited[100006];
/* void dfs(ll int root) {
        visited[root] = true;
        for(ll int i = 0;i < adj[root].size();++i)    {
         if(visited[adj[root][i]] == false)
             dfs(adj[root][i]);
        }
    }           */

// THIS IS DFS WITH COUNTING CONNECTED COMPONENTS
 //memset(visited,0,sizeof(visited));
 /* ll int visited[100006];
void dfs_components(ll int root,ll int counter) {
        visited[root] = counter;
        for(ll int i = 0;i < adj[root].size();++i)    {
         if(visited[adj[root][i]] == 0)
             dfs(adj[root][i],counter);
        }
    }                           */



// THIS PART IS TO BE ADDED IN MAIN TO COUNT CONNECTED COMPONENTS
/*
          ll int con_comp=0;
          for(ll int i = 1;i <=n;++i) {
          if(visited[i] ==0)     {
             dfs(i,con_comp+1);
             con_comp++;
         } }
                                                */


//memset(visited,false,sizeof(visited));
//memset(level,0,sizeof(level));
 /* bool visited[100006];
   ll int level[100006];
 void bfs(int s)
 {
    queue <ll int> q;
    q.push(s);
    level[ s ]=1 ;
    visited[ s ] = true;
    while(!q.empty())
        {
            ll int p = q.front();
            q.pop();
            for(int i = 0;i < adj[ p ].size() ; i++)
            {
                if(visited[ adj[ p ][ i ] ] == false)
                {
                    level[ adj[ p ][ i ] ] = level[ p ]+1;
                     q.push(adj[ p ][ i ]);
                     visited[ adj[ p ][ i ] ] = true;
                }
            }
        }
}                      */


int main()
{
ios_base::sync_with_stdio(false);
    cin.tie(NULL);
ll int T,i,j,ij;
T=1;
 //cin>>T;
while(T--)
{
  ll int n,m;
  cin>>n>>m;
  multiset<ll int>wa;
  set<ll int>ac;

  rep(i,1,m+1)
  {
     ll int a;
     string s;
     cin>>a>>s;
     if(s=="WA"&&ac.find(a)==ac.end())
        wa.insert(a);
     if(s=="AC")
        ac.insert(a) ;
  }
     ll int ap=0;
  for(auto it=wa.begin();it!=wa.end();it++)
       if(ac.find(*it)!=ac.end())
        ap++;

     cout<<ac.size()<<" "<<ap<<endl;





}
return 0;
}












Measured memory_bytes: 4992