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>).
import itertools
import math
import threading
import time
from builtins import input, range
from math import gcd as gcd
import sys
from io import BytesIO, IOBase
import queue
import itertools
import collections
from heapq import heappop, heappush
import random
import os
from random import randint
import decimal
from math import factorial as fac


def solve():
    n = int(sys.stdin.readline())
    a = list(map(int, sys.stdin.readline().split()))

    all_shots = set()

    aa = {}
    for i in range(n):
        all_shots.add(a[i])
        if a[i] not in aa:
            aa[a[i]] = 1
        else:
            aa[a[i]] += 1

    m = int(sys.stdin.readline())
    b = list(map(int, sys.stdin.readline().split()))

    bb = {}
    for i in range(m):
        all_shots.add(b[i])
        if b[i] not in bb:
            bb[b[i]] = 1
        else:
            bb[b[i]] += 1

    max_diff = 3 * (n - m)
    score = [3 * n, 3 * m]

    all_shots = list(all_shots)
    all_shots.sort()

    score_1 = 3 * n
    score_2 = 3 * m

    for d in all_shots:
        if d in aa:
            score_1 -= aa[d]
        if d in bb:
            score_2 -= bb[d]

        if score_1 - score_2 > max_diff:
            max_diff = score_1 - score_2
            score = [score_1, score_2]

    print(score[0], ":", score[1], sep="")


if __name__ == '__main__':
    multytest = False

    if multytest:
        t = int(input())
        for i in range(t):
            solve()
    else:
        solve()
