/*********************************************
* c# template
*20.06.13 AtCoder Beginner Contest 151. C, D (c#)
*********************************************/

namespace TempName{
    using System;
    using System.Linq;
    using System.Collections.Generic;
    using System.Reflection;
    using System.Text;
    using static System.Console;
    using static IOmacro._CSharpInput; 
    using static IOmacro._CppInput;
    
    public class _CRun{
        public readonly int PROBLEM_NUM = 1;

/*********************************************
20.06.13 AtCoder Beginner Contest 151. C - Welcome to AtCoder
N問の問題がある
M回の提出で、正解数とペナルティは？

test input :
2 5
1 WA
1 AC
2 WA
2 AC
2 WA
*********************************************/            
        public void solve1()
        {
            int numProb = cin;
            int numQry = cin;
            
            var arrCntWA = new int[numProb + 1];
            
            int cntAC = 0;
            int cntWA = 0;
            
            while (numQry-- > 0) {
                int inNum = cin;
                string inStr = cin;
                
                if (arrCntWA[inNum] == -1) {
                    continue;
                }
                else if (inStr == "AC") {
                    cntAC += 1;
                    cntWA += arrCntWA[inNum];
                    arrCntWA[inNum] = -1;
                }
                else {
                    arrCntWA[inNum] += 1;
                }
            }
            
            WriteLine($"{cntAC} {cntWA}");
        }

/*********************************************
20.06.13 AtCoder Beginner Contest 151. D - Maze Master

壁と通路が存在する２次元の迷路がある。
出発点と到着点を任意設定できるとき、
最大移動距離は？
*********************************************/            
        public void solve2()
        {
            
        }

/*********************************************

*********************************************/            
        public void solve3()
        {
            
        }

/*********************************************

*********************************************/            
        public void solve4()
        {
            
        }

/*********************************************

*********************************************/            
        public void solve5()
        {
            
        }

/*********************************************

*********************************************/            
        public void solve6()
        {
            
        }
    }

    class Program { 
        static void Main() { 
            var run = new _CRun();
            switch (run.PROBLEM_NUM) {
                case 1: run.solve1(); break;
                case 2: run.solve2(); break;
                case 3: run.solve3(); break;
                case 4: run.solve4(); break;
                case 5: run.solve5(); break;
                case 6: run.solve6(); break;
            }
        } 
    }
}

namespace IOmacro {
    //20.05.10. 수정
    
    using System; 
    using System.Linq; 
    using System.IO;
    using System.Collections.Generic;
    
    public class _CSharpInput {
        public static StreamWriter _writer = new StreamWriter(Console.OpenStandardOutput());
        public const char separator = ' ';
        public static string _string{get{return Console.ReadLine();}}
        public static string[] _stringa{get{return (Console.ReadLine().Split(separator));}}
        public static int _int{get{return int.Parse(Console.ReadLine());}}
        public static int[] _inta{get{return Console.ReadLine().Split(separator).Select(int.Parse).ToArray();}}
        public static long _long{get{return long.Parse(Console.ReadLine());}}
        public static long[] _longa{get{return Console.ReadLine().Split(separator).Select(long.Parse).ToArray();}}    
        public static double _double{get{return double.Parse(Console.ReadLine());}}
        public static double[] _doublea{get{return Console.ReadLine().Split(separator).Select(double.Parse).ToArray();}}    
    }
    
    public class _CppInput {
        public static _CppInput cin => new _CppInput();
        public const char separator = ' ';
        private static readonly Queue<string> _input = new Queue<string>();
        private _CppInput(){}
        public static implicit operator string(_CppInput _) {
            if (_input.Count == 0) Console.ReadLine().Split(separator).foreachExtension(x => _input.Enqueue(x));
            return _input.Dequeue();
        }
        public static implicit operator int(_CppInput _){
            if (_input.Count == 0) Console.ReadLine().Split(separator).foreachExtension(x => _input.Enqueue(x));
            return int.Parse(_input.Dequeue());
        }
        public static implicit operator long(_CppInput _){
            if (_input.Count == 0) Console.ReadLine().Split(separator).foreachExtension(x => _input.Enqueue(x));
            return long.Parse(_input.Dequeue());
        }
        public static implicit operator double(_CppInput _){
            if (_input.Count == 0) Console.ReadLine().Split(separator).foreachExtension(x => _input.Enqueue(x));
            return double.Parse(_input.Dequeue());
        }
    }
    
    public static class _CEnumerableExtension {
        public delegate void Function<in T>(T val);
        public static void foreachExtension<T>(this IEnumerable<T> enumerable, Function<T> function) {
            foreach (var x in enumerable) function(x);
        }
    }
}



Measured memory_bytes: 17620