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.util.*;
import java.io.*;
import java.math.*;
public class Main
{
    static class Reader 
    { 
        private InputStream mIs;private byte[] buf = new byte[1024];private int curChar,numChars;public Reader() { this(System.in); }public Reader(InputStream is) { mIs = is;} 
        public int read() {if (numChars == -1) throw new InputMismatchException();if (curChar >= numChars) {curChar = 0;try { numChars = mIs.read(buf);} catch (IOException e) { throw new InputMismatchException();}if (numChars <= 0) return -1; }return buf[curChar++];} 
        public String nextLine(){int c = read();while (isSpaceChar(c)) c = read();StringBuilder res = new StringBuilder();do {res.appendCodePoint(c);c = read();}while (!isEndOfLine(c));return res.toString() ;} 
        public String s(){int c = read();while (isSpaceChar(c)) c = read();StringBuilder res = new StringBuilder();do {res.appendCodePoint(c);c = read();}while (!isSpaceChar(c));return res.toString();} 
        public long l(){int c = read();while (isSpaceChar(c)) c = read();int sgn = 1;if (c == '-') { sgn = -1 ; c = read() ; }long res = 0; do{ if (c < '0' || c > '9') throw new InputMismatchException();res *= 10 ; res += c - '0' ; c = read();}while(!isSpaceChar(c));return res * sgn;} 
        public int i(){int c = read() ;while (isSpaceChar(c)) c = read();int sgn = 1;if (c == '-') { sgn = -1 ; c = read() ; }int res = 0;do{if (c < '0' || c > '9') throw new InputMismatchException();res *= 10 ; res += c - '0' ; c = read() ;}while(!isSpaceChar(c));return res * sgn;} 
        public double d() throws IOException {return Double.parseDouble(s()) ;}
        public boolean isSpaceChar(int c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; } 
        public boolean isEndOfLine(int c) { return c == '\n' || c == '\r' || c == -1; } 
        public int[] arr(int n){int[] ret = new int[n];for (int i = 0; i < n; i++) {ret[i] = i();}return ret;}
    }
    
    
    ///////////////////////////////////////////////////////////////////////////////////////////
    //    RRRRRRRRR            AAA             HHH     HHH     IIIIIIIIIIIII   LLL           //
    //    RR    RRR           AAAAA            HHH     HHH      IIIIIIIIIII    LLL           //
    //    RR   RRR           AAAAAAA           HHH     HHH          III        LLL           //
    //    RR  RRR           AAA   AAA          HHHHHHHHHHH          III        LLL           //
    //    RRRRRR           AAA     AAA         HHHHHHHHHHH          III        LLL           //
    //    RR  RRR         AAAAAAAAAAAAA        HHH     HHH          III        LLL           //
    //    RR    RRR      AAA         AAA       HHH     HHH      IIIIIIIIIII    LLLLLLLLLLLL  //
    //    RR     RRR    AAA           AAA      HHH     HHH     IIIIIIIIIIIII   LLLLLLLLLLLL  //
    ///////////////////////////////////////////////////////////////////////////////////////////
    
    static int n,m,arr[],brr[];
    public static int lowerbound1(int low,int high,int value)
    {
        while (low < high) 
        {
            int mid = (low + high) / 2;
            if (value <= arr[mid]) 
            high = mid;
            else 
            low = mid + 1;
        }
        return low;
    }
    public static int lowerbound2(int low,int high,int value)
    {
        while (low < high) 
        {
            int mid = (low + high) / 2;
            if (value <= brr[mid]) 
            high = mid;
            else 
            low = mid + 1;
        }
        return low;
    }
    public static void main(String[] args)throws IOException
    {
        PrintWriter out= new PrintWriter(System.out);
        Reader sc=new Reader();
        n=sc.i();arr=sc.arr(n);m=sc.i();brr=sc.arr(m);
        HashMap<Integer,Integer> hm1=new HashMap<>();
        HashMap<Integer,Integer> hm2=new HashMap<>();
        TreeSet<Integer> ts=new TreeSet<>();
        for(int i=0;i<n;i++){ts.add(arr[i]);hm1.put(arr[i],hm1.getOrDefault(arr[i],0)+1);}
        for(int i=0;i<m;i++){ts.add(brr[i]);hm2.put(brr[i],hm2.getOrDefault(brr[i],0)+1);}
        Arrays.sort(arr);
        Arrays.sort(brr);
        int array[]=new int[ts.size()+1];
        int counter=0;
        for(int i:ts)
        array[counter++]=i;
        array[counter++]=2000000001;
        int maxdiff=-2000000000;
        String s="";
        int a=n;
        int b=m;
        for(int i=0;i<counter;i++)
        {
            if(maxdiff<((n-a)*2+a*3)-((m-b)*2+b*3))
            {
                maxdiff=((n-a)*2+a*3)-((m-b)*2+b*3);
                s=(n-a)*2+a*3+":"+((m-b)*2+b*3);
            }
            int value=array[i];
            a-=hm1.getOrDefault(value,0);
            b-=hm2.getOrDefault(value,0);
        }
        if(maxdiff<((n-a)*2+a*3)-((m-b)*2+b*3))
        {
            maxdiff=((n-a)*2+a*3)-((m-b)*2+b*3);
            s=(n-a)*2+a*3+":"+((m-b)*2+b*3);
        }
        out.println(s);
        out.flush();
    }
}