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.IOException;
import java.io.PrintWriter;
import java.util.Arrays;

public class CF_281C {
    
    static Reader sc = new Reader();
    static PrintWriter out = new PrintWriter(System.out);
    
    static int bs(Long[] arr, long val) {
        if(val <= arr[0])
            return -1;
        if(val > arr[arr.length-1])
            return arr.length-1;
        int l = 0;
        int r = arr.length-1;
        int m = (r+l)/2;
        while (r - l > 1) {
            m = (r+l)/2;
            if(arr[m] < val) {
                l = m;
            } else {
                r = m;
            }
        }
        return l;
    }
    
    
    public static void main(String[] args) throws IOException {             
        int nlen = sc.nextInt();
        Long[] A = new Long[nlen];
        for (int i = 0; i < nlen; i++) {
            A[i] = sc.nextLong();
        }       int mlen = sc.nextInt();
        Long[] B = new Long[mlen];
        for (int i = 0; i < mlen; i++) {
            B[i] = sc.nextLong();
        }
                
        Long[] C = new Long[A.length + B.length];
        System.arraycopy(A, 0, C, 0, A.length);
        System.arraycopy(B, 0, C, A.length, B.length);
        for (int i = 0; i < nlen; i++) {
            C[i]--;
        }
        
        Arrays.sort(A);
        Arrays.sort(B);
        Arrays.sort(C);
        
        long bestA = 3*nlen;
        long bestB = 3*mlen;
        long maxDif = Long.MIN_VALUE;

        for (int i = 0; i < C.length; i++) {
            long d = C[i];
            int a3 = bs(A, d+1) + 1;
            int b3 = bs(B, d+1) + 1;
                        
            long scoreA = a3*2 + (nlen - a3)*3;
            long scoreB = b3*2 + (mlen - b3)*3;
            
            if( scoreA - scoreB > maxDif) {
                maxDif = scoreA - scoreB;
                bestA = scoreA;
                bestB = scoreB;
            } else if (scoreA - scoreB == maxDif) {
                if(scoreA > bestA) {
                    bestA = scoreA;
                    bestB = scoreB;
                }
            }
        }
        
        out.println(bestA + ":" + bestB);
        out.close();
    }
    
    static class Reader {
        final private int BUFFER_SIZE = 1 << 16;private byte[] buffer;private int bufferPointer, bytesRead;
        public Reader(){buffer=new byte[BUFFER_SIZE];bufferPointer=bytesRead=0;
        }private void fillBuffer() throws IOException{bytesRead=System.in.read(buffer,bufferPointer=0,BUFFER_SIZE);if(bytesRead==-1)buffer[0]=-1;
        }private byte read() throws IOException{if(bufferPointer==bytesRead)fillBuffer();return buffer[bufferPointer++];
        }public String next() throws IOException{StringBuilder sb = new StringBuilder();byte c;while((c=read())<=' '){if(c==-1) return null;};do{sb.append((char)c);}while((c=read())>' ');if (sb.length()==0) return null;return sb.toString();
        }public String nextLine() throws IOException{StringBuilder sb = new StringBuilder();byte c;boolean read = false;while((c=read())!=-1){if(c=='\n') {read = true;break;}if(c>=' ')sb.append((char)c);}if (!read) return null;return sb.toString();
        }public int nextInt() throws IOException{int ret=0;byte c=read();while(c<=' ')c=read();boolean neg=(c=='-');if(neg)c=read();do{ret=ret*10+c-'0';}while((c=read())>='0'&&c<='9');if(neg)return -ret;return ret;
        }public long nextLong() throws IOException{long ret=0;byte c=read();while(c<=' ')c=read();boolean neg=(c=='-');if(neg)c=read();do{ret=ret*10L+c-'0';}while((c=read())>='0'&&c<='9');if(neg)return -ret;return ret;
        }public double nextDouble() throws IOException{double ret=0,div=1;byte c=read();while(c<=' ')c=read();boolean neg=(c=='-');if(neg)c = read();do {ret=ret*10+c-'0';}while((c=read())>='0'&&c<='9');if(c=='.')while((c=read())>='0'&&c<='9')ret+=(c-'0')/(div*=10);if(neg)return -ret;return ret;
        }public int[] na(int n) throws IOException{int[] a = new int[n];for(int i = 0;i < n;i++)a[i] = nextInt();return a;
        }public int[][] nm(int n, int m) throws IOException{int[][] map = new int[n][m];for(int i = 0;i < n;i++)map[i] = na(m);return map;
        }public void close() throws IOException{if(System.in==null) return;System.in.close();}
    }
    
    static void print(int[] A) {for(int i=0;i<A.length;i++){if(i!=0) out.print(' ');out.print(A[i]);}out.println();}
    static <T> void print(Iterable<T> A) {int i = 0;for(T act : A){if(i!=0)out.print(' ');out.print(act);i++;}out.println();}
    static void debug(Object... o) { System.err.println(Arrays.deepToString(o)); }
    
    /*
    long s = System.currentTimeMillis();
    debug(System.currentTimeMillis()-s+"ms");
     */
}
