You are playing the following game with Joisino.    * Initially, you have a blank sheet of paper.   * Joisino announces a number. If that number is written on the sheet, erase the number from the sheet; if not, write the number on the sheet. This process is repeated N times.   * Then, you are asked a question: How many numbers are written on the sheet now?  The numbers announced by Joisino are given as A_1, ... ,A_N in the order she announces them. How many numbers will be written on the sheet at the end of the game?
n = int(input())
C = {}
for _ in range(n):
    a = input()
    if a not in C:
        C[a] = 0
    C[a] += 1
print(C)
for i in C.keys():
    C[i] %= 2
print(sum(C.values()))
n = int(input())
C = {}
for _ in range(n):
    a = input()
    if a not in C:
        C[a] = 0
    C[a] += 1
for i in C.keys():
    C[i] %= 2
print(sum(C.values()))