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
//    package com.company;
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.lang.reflect.Array;
    import java.util.*;
    public class Main {

        public static void main(String[] args) throws IOException {
             Scanner s=new Scanner(System.in);
            //BufferedReader s=new BufferedReader(new InputStreamReader(System.in));
            StringBuilder sb=new StringBuilder();
            int n=s.nextInt();
            long[] a=new long[n];

            for(int i=0;i<n;i++)
               a[i]=s.nextLong();
            int m=s.nextInt();
            long[] b=new long[m];
            for(int i=0;i<m;i++)
                b[i]=s.nextLong();
            Arrays.sort(a);Arrays.sort(b);
                long ans=n*2-m*2;long ansa=n*2;long ansb=m*2;
            for(int i=n-1;i>=0;i--){
                      long d=a[i]-1;int hu=-1;
                      int low=0;int high=m-1;
                      while(low<=high){
                          int mid=(low+high)/2;
                          if(b[mid]>d){
                              hu=mid;high=mid-1;
                          }else{
                              low=mid+1;
                          }
                      }if(hu!=-1){
                    if(((n-i)*3+i*2)-((m-hu)*3+hu*2)>ans||(((n-i)*3+i*2)-((m-hu)*3+hu*2)==ans&&((n-i)*3+i*2)>ansa)){
                        ans=((n-i)*3+i*2)-((m-hu)*3+hu*2);
                        ansa=((n-i)*3+i*2);
                        ansb=((m-hu)*3+hu*2);
                //        System.out.println(ansa+" "+ansb+" "+hu);
                    }
                }else {
                          if(((n-i)*3+i*2)-(m*2)>ans||(((n-i)*3+i*2)-(m*2)==ans&&((n-i)*3+i*2)>ansa)){
                              ans=((n-i)*3+i*2)-(m*2);
                              ansa=((n-i)*3+i*2);
                              ansb=m*2;
                          }
                }
            }
            System.out.println(ansa+":"+ansb);
            }static int[] vis;
        static double power(double x, long y, int p) {
            double res = 1;
            x = x % p;
            while (y > 0) {
                if ((y & 1) == 1)
                    res = (res * x) % p;
                y = y >> 1;
                x = (x * x) % p;
            }
            return res;
        }
        public static void fracion(double x) {
            String a = "" + x;
            String spilts[] = a.split("\\."); // split using decimal
            int b = spilts[1].length(); // find the decimal length
            int denominator = (int) Math.pow(10, b); // calculate the denominator
            int numerator = (int) (x * denominator); // calculate the nerumrator Ex
            // 1.2*10 = 12
            int gcd = gcd(numerator, denominator); // Find the greatest common
            // divisor bw them
            String fraction = "" + numerator / gcd + "/" + denominator / gcd;
            // System.out.println((denominator/gcd));
            long x1=modInverse(denominator / gcd,998244353  );
            //  System.out.println(x1);
            System.out.println((((numerator / gcd )%998244353 *(x1%998244353  ))%998244353  ) );
        }static int max=Integer.MIN_VALUE;
static int max1=Integer.MIN_VALUE;static int[] ans;
        public static int dfs(int papa, int i, ArrayList<Integer>[] h, int[] vis) {

             vis[i] = 1;
             if(h[i]==null){ans[i]=1; return 1;}
             for(Integer j:h[i]){
                 if(vis[j]==1) {
                     ans[i]+=ans[j];
                 }else{
                     ans[i]+=dfs(papa,j,h,vis);
                 }
             }ans[i]+=1;if(ans[i]>max){
                 max=ans[i];max1=i;
            }
          return ans[i];
        }



        public static void bfs(int i, HashMap<Integer, Integer>[] h, int[] vis, int len, int papa) {
            Queue<Integer> q = new LinkedList<Integer>();
            q.add(i);

        }


        static int i(String a) {
            return Integer.parseInt(a);
        }

        static long l(String a) {
            return Long.parseLong(a);
        }

        static String[] inp() throws IOException {
            BufferedReader s = new BufferedReader(new InputStreamReader(System.in));
            return s.readLine().trim().split("\\s+");
        }


        static int gcd(int a, int b) {
            if (b == 0)
                return a;
            return gcd(b, a % b);
        }
        static long modInverse(int a, int m)
        {


            {
                // If a and m are relatively prime, then modulo inverse
                // is a^(m-2) mode m
                return (power(a, m - 2, m));
            }
        }

        // To compute x^y under modulo m
        static long power(int x, int y, int m)
        {
            if (y == 0)
                return 1;

            long p = power(x, y / 2, m) % m;
            p = (p * p) % m;

            if (y % 2 == 0)
                return p;
            else
                return (x * p) % m;
        }

        // Function to return gcd of a and b

    }
    class Student
    {
        int l,r;

        public Student(int l, int r) {
            this.l = l;
            this.r = r;

        }
    // Constructor


        // Used to print student details in main()
        public String toString()
        {
            return this.l+" ";
        }
    }

    class Sortbyroll implements Comparator<Student>
    {
        // Used for sorting in ascending order of
        // roll number
        public int compare(Student a, Student b){
            return a.l-b.l;
        }
    }