'use strict'

function Main(input) {
  input = input.trim().split('\n')
  const array = input[0].split(' ').map(s => parseInt(s))
  const N = array[0]
  const M = array[1] // 提出回数

  const rest = input.slice(1)

  const list = rest.map(s => {
    return s.split(' ')
  })

  let dp = {}
  list.forEach(data => {
    if(!dp[data[0]]) dp[data[0]] = {success: 0, fail: 0, fixed: false}
    // AC
    if(data[1] === 'AC' && !dp[data[0]].fixed) {
      dp[data[0]].success += 1
      dp[data[0]].fixed = true
    } else if(data[1] === 'WA' && !dp[data[0]].fixed) {
      dp[data[0]].fail += 1
    }
  })


  let success = 0
  let pena = 0
  for(let i in dp) {
    const tmp = dp[i]
    if (tmp.fixed) {
      success += tmp.success
      pena += tmp.fail
    }
  }


  console.log(`${success} ${pena}`)

}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));