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.

Input

The first line contains integer n (1 ≤ n ≤ 2·105) — the number of throws of the first team. Then follow n integer numbers — the distances of throws ai (1 ≤ ai ≤ 2·109). 

Then follows number m (1 ≤ m ≤ 2·105) — the number of the throws of the second team. Then follow m integer numbers — the distances of throws of bi (1 ≤ bi ≤ 2·109).

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
import java.io.*;
import java.lang.*;
import java.util.*;
import java.math.*;

public class code
{
	static class FastReader 
    { 
        BufferedReader br; 
        StringTokenizer st; 
  
        public FastReader() 
        { 
            br = new BufferedReader(new
                     InputStreamReader(System.in)); 
        } 
  
        String next() 
        { 
            while (st == null || !st.hasMoreElements()) 
            { 
                try
                { 
                    st = new StringTokenizer(br.readLine()); 
                } 
                catch (IOException  e) 
                { 
                    e.printStackTrace(); 
                } 
            } 
            return st.nextToken(); 
        } 
  
        int nextInt() 
        { 
            return Integer.parseInt(next()); 
        } 
  
        long nextLong() 
        { 
            return Long.parseLong(next()); 
        } 
  
        double nextDouble() 
        { 
            return Double.parseDouble(next()); 
        } 
  
        String nextLine() 
        { 
            String str = ""; 
            try
            { 
                str = br.readLine(); 
            } 
            catch (IOException e) 
            { 
                e.printStackTrace(); 
            } 
            return str; 
        } 
    } 
  
	public static void main(String args[])throws IOException
	{

		Scanner scn = new Scanner(System.in);

        int n = scn.nextInt();
        int[] a = new int[n];
        for(int i = 0; i < n; i++)
            a[i] = scn.nextInt();
        Arrays.sort(a);

        int m = scn.nextInt();
        int[] b = new int[m];
        for(int i = 0; i < m; i++)
            b[i] = scn.nextInt();
        Arrays.sort(b);

        long maximum = Long.MIN_VALUE;
        long max_a = -1;
        long max_b = -1;
        int j = 0;
        for(int i = 0; i < n; i++)
        {
            if(i > 0 && a[i] == a[i-1])
                continue;

            while(j < m && b[j] < a[i])
            {
                j++;
            }

            int diff = (3*(n - i) + 2*i) - (3*(m - j) + 2*j);
            if(diff > maximum)
            {
                maximum = diff;
                max_a = 3*(n - i) + 2*i;
                max_b = 3*(m - j) + 2*j;
            }
        }
        if(2*n - 2*m > maximum)
        {
            maximum = 2*n - 2*m;
            max_a = 2*n;
            max_b = 2*m;
        }
        
        System.out.println(max_a+":"+max_b);
	}

    public static char toggle(char x)
    {
        return (x == '0')?'1':'0';
    }
}

class Point implements Comparable<Point>
{
    long x, y;
    StringBuilder travelTo;
    StringBuilder travelBack;
    long commands;
    public Point(long x, long y)
    {
        this.x = x;
        this.y = y;
        commands = 2; 
        travelTo = new StringBuilder();
        travelBack = new StringBuilder();
    }

    public int compareTo(Point p)
    {
        long score_p = Math.abs(p.x) + Math.abs(p.y);
        long score_this = Math.abs(this.x) + Math.abs(this.y);

        if(score_this < score_p)
            return -1;
        else if (score_this > score_p)
            return 1;
        else
            return 0;
    }

    public void travelTo()
    {
        if(Math.abs(this.x) > 0)
        {
            if(this.x < 0)
                this.travelTo.append("1 " + Math.abs(this.x)+" L\n");
            else
                this.travelTo.append("1 " + Math.abs(this.x)+" R\n");
            this.commands++;
        }

        if(Math.abs(this.y) > 0)
        {
            if(this.y < 0)
                this.travelTo.append("1 " + Math.abs(this.y)+" D\n");
            else
                this.travelTo.append("1 " + Math.abs(this.y)+" U\n");
            this.commands++;
        }

    }

    public void travelBack()
    {
        if(Math.abs(this.y) > 0)
        {
            if(this.y < 0)
                this.travelBack.append("1 " + Math.abs(this.y)+" U\n");
            else
                this.travelBack.append("1 " + Math.abs(this.y)+" D\n");
            this.commands++;
        }
        if(Math.abs(x) > 0)
        {
            if(this.x < 0)
                this.travelBack.append("1 " + Math.abs(this.x)+" R\n");
            else
                this.travelBack.append("1 " + Math.abs(this.x)+" L\n");
            this.commands++;
        }
    }


    public void print()
    {
        System.out.println(this.x+" "+this.y);
    }
}

class Pair implements Comparable<Pair>
{
	long p, h;
	public Pair(long p, long h)
	{
		this.p = p;
		this.h = h;	
	}

	public int compareTo(Pair pair)
	{
		if(this.p < pair.p)
			return -1;
		else if(this.p > pair.p)
			return 1;
		else
			return 0;
	}
}

