using System;
using System.Collections.Generic;
using System.Linq;

namespace AtCoder
{
    class Program
    {
        class S
        {
            public bool IsAc;
            public int numWa;
        }

        static void Main(string[] args)
        {
            var NM = Io.ReadList<int>();
            var N = NM[0];
            var M = NM[1];
            var pSList = Io.ReadListRepeat(M)
                .Select(pS => new { p = int.Parse(pS[0]), S = pS[1] });

            var dic = new Dictionary<int, S>();
            foreach (var pS in pSList)
            {
                if (!dic.ContainsKey(pS.p))
                {
                    dic.Add(pS.p, new S());
                }

                switch (pS.S)
                {
                    case "AC":
                        dic[pS.p].IsAc = true;
                        break;

                    case "WA":
                        if (!dic[pS.p].IsAc)
                        {
                            dic[pS.p].numWa++;
                        }
                        break;
                }
            }

            var numAc = 0;
            var numWa = 0;
            foreach (var s in dic)
            {
                if (s.Value.IsAc)
                {
                    numAc++;
                    numWa += s.Value.numWa;
                }
            }

            Io.Write($"{numAc} {numWa}");
        }

        static class Permutation
        {
            private static void Search<T>(List<T[]> perms, Stack<T> stack, T[] a)
            {
                int N = a.Length;
                if (N == 0)
                {
                    perms.Add(stack.Reverse().ToArray());
                }
                else
                {
                    var b = new T[N - 1];
                    Array.Copy(a, 1, b, 0, N - 1);
                    for (int i = 0; i < a.Length; ++i)
                    {
                        stack.Push(a[i]);
                        Search(perms, stack, b);
                        if (i < b.Length) { b[i] = a[i]; }
                        stack.Pop();
                    }
                }
            }
            public static IEnumerable<T[]> All<T>(IEnumerable<T> src)
            {
                var perms = new List<T[]>();
                Search(perms, new Stack<T>(), src.ToArray());
                return perms;
            }
        }

        static int NumberOfDigits(long x)
        {
            if (x < 10) return 1;

            var result = 0;
            while (x > 0)
            {
                result++;
                x /= 10;
            }

            return result;
        }

        static int SumOfDigits(int x)
        {
            var sum = 0;
            while (x > 0)
            {
                sum += x % 10;
                x /= 10;
            }

            return sum;
        }

        class Io
        {
            public static string Read()
            {
                return Console.ReadLine();
            }

            public static IEnumerable<string> ReadRepeat(int count)
            {
                return Enumerable.Range(0, count).Select(_ => Read());
            }

            public static T Read<T>()
            {
                return (T)Convert.ChangeType(Read(), typeof(T));
            }

            public static IEnumerable<T> ReadRepeat<T>(int count)
            {
                return Enumerable.Range(0, count).Select(_ => Read<T>());
            }

            public static string[] ReadList(char devide = ' ')
            {
                return Read().Split(devide);
            }

            public static T[] ReadList<T>(char devide = ' ')
            {
                return ReadList(devide)
                    .Select(s => (T)Convert.ChangeType(s, typeof(T)))
                    .ToArray();
            }

            public static IEnumerable<string[]> ReadListRepeat(int count, char devide = ' ')
            {
                return Enumerable.Range(0, count).Select(_ => ReadList(devide));
            }

            public static IEnumerable<T[]> ReadListRepeat<T>(int count, char devide = ' ')
            {
                return Enumerable.Range(0, count).Select(_ => ReadList<T>(devide));
            }

            public static void Write(string value)
            {
                Console.WriteLine(value);
            }
        }
    }
}


Measured memory_bytes: 22600