text: #include <algorithm>
  #include <boost/optional.hpp>
  #include <climits>
  #include <cmath>
  #include <cstdio>
  #include <cstring>
  #include <functional>
  #include <iostream>
  #include <limits>
  #include <list>
  #include <numeric>
  #include <queue>
  #include <sstream>
  #include <string>
  #include <tuple>
  #include <type_traits>
  #include <utility>
  #include <vector>
  
  #define REP(i, n) for(int i = 0, i##_MACRO = (n); i < i##_MACRO; i++)
  #define RANGE(i, a, b) for(int i = (a), i##_MACRO = (b); i < i##_MACRO; i++)
  #define EACH(e, a) for(auto&& e : a)
  #define ALL(a) (a).begin(), (a).end()
  #define AALL(a, n) (a), ((a) + (n))
  #define FILL(a, n) memset((a), n, sizeof(a))
  #define FILLZ(a) FILL(a, 0)
  #define MODNUM (static_cast<int>(1e9 + 7))
  #define MOD(x) ((x) % MODNUM)
  
  using namespace std;
  
  using ll = long long;
  using VI = vector<int>;
  using VI2D = vector<vector<int>>;
  
  const int INF = 2e9;
  const double EPS = 1e-10;
  const double PI = acos(-1.0);
  
  const int dx[] = {-1, 0, 1, 0};
  const int dy[] = {0, -1, 0, 1};
  
  template <typename T>
  int sign(T x) {
  	return x < 0 ? -1 : x > 0 ? 1 : 0;
  }
  
  template <>
  int sign(double x) {
  	return x < -EPS ? -1 : x > EPS ? 1 : 0;
  }
  
  template <typename T>
  T square(T x) {
  	return x * x;
  }
  
  inline int toInt(string s) {
  	int v;
  	istringstream sin(s);
  	sin >> v;
  	return v;
  }
  
  int main() {
  	int n, m;
  	scanf("%d %d", &n, &m);
  	VI wa(n, 0);
  	VI ac(n, 0);
  	REP(i, m) {
  		int problem;
  		char status[3];
  		scanf("%d %s", &problem, status);
  		problem--;
  		if(status[0] == 'A') { // AC
  			ac[problem] = 1;
  		} else { // WA
  			if(ac[problem] == 0) {
  				wa[problem]++;
  			}
  		}
  	}
  	int cac = 0;
  	int cwa = 0;
  	REP(i, n) {
  		cac += ac[i];
  		if(ac[i] == 1) {
  			cwa += wa[i];
  		}
  	}
  	printf("%d %d\n", cac, cwa);
  	return 0;
  }