output_description: Print the number of Takahashi's correct answers and the number of Takahashi's
  penalties.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N M
      p_1 S_1
      :
      p_M S_M
attempt: N, M = map(int, input().split())
  L = [list(input().split()) for _ in range(M)]
  D_1 = {str(c): False for c in range(1, N + 1)}
  D_2 = {str(c): 0 for c in range(1, N + 1)}
  for l in L:
      if l[1] == "WA" and D_1[l[0]] == False:
          D_2[l[0]] += 1
      else:
          D_1[l[0]] = True
  S_1 = sum(D_2[k] for k, v in D_2.items() if v)
  S_2 = sum(D_1.values())
  print(S_2, S_1)
  
problem_description: Statement
  
  Takahashi participated in a contest on AtCoder.
  
  The contest had N problems.
  
  Takahashi made M submissions during the contest.
  
  The i-th submission was made for the p_i-th problem and received the verdict
  S_i (`AC` or `WA`).
  
  The number of Takahashi's correct answers is the number of problems on which
  he received an `AC` once or more.
  
  The number of Takahashi's penalties is the sum of the following count for the
  problems on which he received an `AC` once or more: the number of `WA`s
  received before receiving an `AC` for the first time on that problem.
  
  Find the numbers of Takahashi's correct answers and penalties.
samples: [{"input": "2 5\n    1 WA\n    1 AC\n    2 WA\n    2 AC\n    2 WA", "output": "2 2\n    \n\nIn his second submission, he received an `AC` on the first problem for the\nfirst time. Before this, he received one `WA` on this problem.\n\nIn his fourth submission, he received an `AC` on the second problem for the\nfirst time. Before this, he received one `WA` on this problem.\n\nThus, he has two correct answers and two penalties.\n\n* * *"}, {"input": "100000 3\n    7777 AC\n    7777 AC\n    7777 AC", "output": "1 0\n    \n\nNote that it is pointless to get an `AC` more than once on the same problem.\n\n* * *"}, {"input": "6 0", "output": "0 0"}]