Vasya follows a basketball game and marks the distances from which each team makes a throw. He knows that each successful throw has value of either 2 or 3 points. A throw is worth 2 points if the distance it was made from doesn't exceed some value of *d* meters, and a throw is worth 3 points if the distance is larger than *d* meters, where *d* is some non-negative integer.

Vasya would like the advantage of the points scored by the first team (the points of the first team minus the points of the second team) to be maximum. For that he can mentally choose the value of *d*. Help him to do that.
The first line contains integer *n* (1 ≤ *n* ≤ 2·10<sup class="upper-index">5</sup>) — the number of throws of the first team. Then follow *n* integer numbers — the distances of throws *a*<sub class="lower-index">*i*</sub> (1 ≤ *a*<sub class="lower-index">*i*</sub> ≤ 2·10<sup class="upper-index">9</sup>). 

Then follows number *m* (1 ≤ *m* ≤ 2·10<sup class="upper-index">5</sup>) — the number of the throws of the second team. Then follow *m* integer numbers — the distances of throws of *b*<sub class="lower-index">*i*</sub> (1 ≤ *b*<sub class="lower-index">*i*</sub> ≤ 2·10<sup class="upper-index">9</sup>).
def quick_sort(a):
    if len(a) <= 1:
        return a

    mid = a[0]
    less = [i for i in a[1:] if i <= a[0]]
    great = [i for i in a[1:] if i > a[0]]
    a = quick_sort(less) + [mid] + quick_sort(great)
    return a


def main():
    n = int(input())
    a = list(map(int, input().split()))
    m = int(input())
    b = list(map(int, input().split()))
    c = set(a + b)
    c = list(c)
    c = c + [0]
    a = quick_sort(a)
    b = quick_sort(b)
    c = quick_sort(c)
    a_dict = {}
    b_dict = {}
    for i in c:
        a_dict[str(i)] = 0
        b_dict[str(i)] = 0
    for i in a:
        a_dict[str(i)] += 1

    for i in b:
        b_dict[str(i)] += 1
    count_a = len(a) * 2
    count_b = len(b) * 2
    answer = count_a - count_b
    res = answer
    res_a = count_a
    res_b = count_b
    for i in range(len(c) - 2, -1, -1):
        res_a += a_dict[str(c[i + 1])]
        res_b += b_dict[str(c[i + 1])]
        res = res_a - res_b
        if res > answer:
            answer = res
            count_a = res_a
            count_b = res_b
    return f'{count_a}:{count_b}'


print(main())