import java.util.HashSet;
import java.util.Scanner;

fun main (args : Array <String>) {
  val input = Scanner(System.`in`)
  
  while (input.hasNext()) {
    val N = input.nextInt()
    val M = input.nextInt()
    val penalty = IntArray(N + 1)
    val ACProb = HashSet<Int>()
    
    for (i in 1..M) {
      val p = input.nextInt()
      val S = input.next()
      
      if (S.equals("WA") && ACProb.contains(p) == false) {
        ++penalty[p]
      } else if (S.equals("AC")) {
        ACProb.add(p)
      }
    }
    
    for (i in 1..N) {
      if (ACProb.contains(i) == false ) {
         penalty[i] = 0
      }
    }
    
    println("${ACProb.size} ${penalty.sum()}")
  }
}