Please subscribe to the official Codeforces channel in Telegram via the link: https://t.me/codeforces_official.
×

Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ACM-ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

C. Vasya and Basketball

time limit per test

2 secondsmemory limit per test

256 megabytesinput

standard inputoutput

standard outputVasya 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.

Input

The first line contains integer *n* (1 ≤ *n* ≤ 2·10^{5}) — the number of throws of the first team. Then follow *n* integer numbers — the distances of throws *a*_{i} (1 ≤ *a*_{i} ≤ 2·10^{9}).

Then follows number *m* (1 ≤ *m* ≤ 2·10^{5}) — the number of the throws of the second team. Then follow *m* integer numbers — the distances of throws of *b*_{i} (1 ≤ *b*_{i} ≤ 2·10^{9}).

Output

Print two numbers in the format a:b — the score that is possible considering the problem conditions where the result of subtraction *a* - *b* is maximum. If there are several such scores, find the one in which number *a* is maximum.

Examples

Input

3

1 2 3

2

5 6

Output

9:6

Input

5

6 7 8 9 10

5

1 2 3 4 5

Output

15:10

Codeforces (c) Copyright 2010-2018 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Dec/15/2018 11:12:09 (d1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|