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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.StringTokenizer;

public class CodeForces {
    static reader input = new reader();
    static PrintWriter output = new PrintWriter(System.out);

    public static void main(String[] args) throws IOException {
        /*
        BufferedReader bf = new BufferedReader(new FileReader("input.txt"));
        PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter("output.txt")));
        StringTokenizer stk= new StringTokenizer(bf.readLine());;
        int n=Integer.parseInt(stk.nextToken());
        */
        C();
        output.close();
    }

    public static void A(){

    }

    public static void B(){

    }

    public static void C(){
        ArrayList<Integer>arr=new ArrayList<>();
        int n=input.nextInt();
        int a[]=new int[n];
        for(int i=0;i<n;i++){
            a[i]=input.nextInt();
            arr.add(a[i]);
        }
        int m=input.nextInt();
        int b[]=new int[m];
        for(int i=0;i<m;i++){
            b[i]=input.nextInt();
            arr.add(b[i]);
        }
        Collections.sort(arr);
        HashMap<Integer,Integer>hm=new HashMap<>();
        hm.put(arr.get(0),1);
        int curr=2;
        for(int i=1;i<arr.size();i++){
            if(arr.get(i)!=arr.get(i-1)){
                hm.put(arr.get(i),curr++);
            }
        }
        int counta[]=new int[curr+1],countb[]=new int[curr+1];
        for(int i=0;i<n;i++){
            counta[hm.get(a[i])]++;
        }
        for(int i=0;i<m;i++){
            countb[hm.get(b[i])]++;
        }
        for(int i=1;i<curr;i++){
            counta[i]+=counta[i-1];
        }
        for(int i=1;i<curr;i++){
            countb[i]+=countb[i-1];
        }
        int max=Integer.MIN_VALUE;
        int socrea=-1,scoreb=-1;
        for(int i=0;i<=curr;i++){
            int tempa=counta[i]*2+((n-counta[i])*3),tempb=(countb[i]*2+((m-countb[i])*3));
            if(tempa-tempb>max){
                max=tempa-tempb;
                socrea=tempa;
                scoreb=tempb;
            }
        }
        output.println(socrea+":"+scoreb);
    }

    public static void D(){

    }

    public static void E(){

    }

    public static void F(){

    }

    public static long factorial(int a){
        long ans=1;
        for(int i=1;i<=a;i++){
            ans*=i;
        }
        return ans;
    }
    public static long LCM(long a,long b){
        return (a*b)/GCD(a,b);
    }
    public static long GCD(long a,long b){
        if(a==0)
            return b;
        else if(b==0)
            return a;
        else
            return GCD(b%a,a);
    }

    public static boolean isPrime(long num){
        if(num==1)
            return false;
        else if(num==2||num==3)
            return true;
        else if(num%2==0||num%3==0)
            return false;
        else{
            for(long i=5;i*i<=num;i+=6){
                if(num%i==0||num%(i+2)==0)
                    return false;
            }
        }
        return true;
    }

    public static ArrayList<Integer> SieveofEratothenis(){
        ArrayList<Integer>ans=new ArrayList<>();
        boolean visited[]=new boolean[1000000];
        for(int i=2;i<1000000;i++){
            if(!visited[i]){
                ans.add(i);
                for(long j=(long)i*i;j<1000000;j+=i){
                    visited[(int)j]=true;
                }
            }
        }
        return ans;
    }

    public static void mergesort(long arr[],int start,int end){//start and end must be indexes
        if(start<end) {
            int mid=(start+end)/2;
            mergesort(arr,start,mid);
            mergesort(arr, mid+1, end);
            merge(arr, start,mid,end);
        }
    }
    public static void merge(long arr[],int start,int mid,int end){
        int lsize=mid-start+1,rsize=end-mid;
        long l[]=new long[lsize],r[]=new long[rsize];
        for(int i=start;i<=mid;i++){
            l[i-start]=arr[i];
        }
        for(int i=mid+1;i<=end;i++){
            r[i-mid-1]=arr[i];
        }
        int i=0,j=0,k=start;
        while(i<lsize&&j<rsize){
            if(l[i]<=r[j]){
                arr[k++]=l[i++];
            }else{
                arr[k++]=r[j++];
            }
        }
        while(i<lsize)
            arr[k++]=l[i++];
        while(j<rsize)
            arr[k++]=r[j++];
    }
}

class Value{
    int ans;
}

class Pair{
    int x,y;
    Pair(int x,int y){
        this.x=x;
        this.y=y;
    }
}

class Op{
    int op,count;
    char dir;
    public Op(int op){
        this.op=op;
    }
}

class reader {
    BufferedReader br;
    StringTokenizer st;

    public reader() {
        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 int[] nextIntArray(int arraySize) {
        int array[] = new int[arraySize];
        for (int i = 0; i < arraySize; i++) {
            array[i] = nextInt();
        }
        return array;
    }

    public long[] nextLongArray(int arraySize) {
        long array[] = new long[arraySize];
        for (int i = 0; i < arraySize; i++) {
            array[i] = nextLong();
        }
        return array;
    }
}
