#include <iostream>
#include <map>
#include <string>
using namespace std;
int main()
{
 int i,x,m,n,c,w;
 string s;
 c=w=0;
 map<int,int> wa;
 map<int,int> ac;
 cin >> n >> m;
 while(m--)
 {
  cin >> x >> s;
  if(s=="AC")
  {
   if(ac.find(x)==ac.end())
   {
    c++;
    if(wa.find(x)!=wa.end())
    w+=wa[x];
   }
   ac[x]=1;
  }
  else
  wa[x]++;
 }
 cout << c << " " << w;
 return 0;
}