import java.awt.Point;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Comparator;
import java.util.StringTokenizer;

public class Solution{

    ///////////////////////////////////////////////////////////////////////////
    static class FastScanner{
        BufferedReader s;
        StringTokenizer st;

        public FastScanner(InputStream InputStream){
            st = new StringTokenizer("");
            s = new BufferedReader(new InputStreamReader(InputStream));
        }

        public FastScanner(File f) throws FileNotFoundException{
            st = new StringTokenizer("");
            s = new BufferedReader (new FileReader(f));
        }

        public int nextInt() throws IOException{
            if(st.hasMoreTokens())
                return Integer.parseInt(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextInt();
            }
        }

/*      public double nextDouble() throws IOException{
            if(st.hasMoreTokens())
                return Double.parseDouble(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextDouble();
            }
        }
*/
        public long nextLong() throws IOException{
            if(st.hasMoreTokens())
                return Long.parseLong(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextLong();
            }
        }

        public String nextString() throws IOException{
            if(st.hasMoreTokens())
                return st.nextToken();
            else{
                st = new StringTokenizer(s.readLine());
                return nextString();
            }

        }
        public String readLine() throws IOException{
            return s.readLine();
        }

        public void close() throws IOException{
            s.close();
        }

    }

    ////////////////////////////////////////////////////////////////////
    //      Number Theory

    long pow(long a,long b,long mod){
        long x = 1; long y = a;
        while(b > 0){
            if(b % 2 == 1){
                x = (x*y);
                x %= mod;
            }
            y = (y*y);
            y %= mod;
            b /= 2;
        }
        return x;
    }

    int divisor(long x,long[] a){
        long limit = x;
        int numberOfDivisors = 0;

        for (int i=1; i < limit; ++i) {
            if (x % i == 0) {
                limit = x / i;
                if (limit != i) {
                    numberOfDivisors++;
                }
                numberOfDivisors++;
            }
        }
        return numberOfDivisors;
    }

    void findSubsets(int array[]){

        long numOfSubsets = 1 << array.length;
        for(int i = 0; i < numOfSubsets; i++){

            int pos = array.length - 1;
            int bitmask = i;

            while(bitmask > 0){
                if((bitmask & 1) == 1)
                    ww.print(array[pos]+" ");

                bitmask >>= 1;
                pos--;
            }

            ww.println();
        }
    }

    public static long gcd(long a, long b){
        return b == 0 ? a : gcd(b,a%b);
    }

    public static int lcm(int a,int b, int c){
        return lcm(lcm(a,b),c);
    }

    public static int lcm(int a, int b){
        return (int) (a*b/gcd(a,b));
    }

    public static long invl(long a, long mod) {
        long b = mod;
        long p = 1, q = 0;
        while (b > 0) {
            long c = a / b;
            long d;
            d = a;
            a = b;
            b = d % b;
            d = p;
            p = q;
            q = d - c * q;
        }
        return p < 0 ? p + mod : p;
    }

    ////////////////////////////////////////////////////////////////////

//    private static    FastScanner s = new FastScanner(new File("input.txt"));
//    private static PrintWriter ww = new PrintWriter(new FileWriter("output.txt"));
    static InputStream inputStream = System.in;
    static FastScanner s = new FastScanner(inputStream);
    static OutputStream outputStream = System.out;
    static PrintWriter ww = new PrintWriter(new OutputStreamWriter(outputStream));
//      private static Scanner s = new Scanner(System.in);
    @SuppressWarnings("unused")
    private static int[][] states = { {-1,0} , {1,0} , {0,-1} , {0,1} };

    ////////////////////////////////////////////////////////////////////

    public static void main(String[] args) throws IOException{
        new Solution().solve();
        s.close();
        ww.close();
    }

    ////////////////////////////////////////////////////////////////////

    class Node implements Comparable<Node>{
        int x;
        int mark;
        public Node(int x,int mark){
            this.x = x;
            this.mark = mark;
        }
        @Override
        public int compareTo(Node arg0) {
            // TODO Auto-generated method stub
            return Integer.compare(x, arg0.x);
        }

    }

    void solve() throws IOException{

        int n = s.nextInt();
        int[] a = new int[n];
        int cn = 0;
        for(int i=0;i<n;i++) a[i] = s.nextInt();
        int m = s.nextInt();
        int[] b = new int[m];
        for(int i=0;i<m;i++) b[i] = s.nextInt();
        Node[] ar = new Node[n+m];

        long suma = 0;
        long sumb = 0;
        long ansa = Long.MIN_VALUE;
        long ansb = Long.MIN_VALUE;
        for(int i=0;i<n;i++)
            ar[cn++] = new Node(a[i],0);

        for(int i=0;i<m;i++)
            ar[cn++] = new Node(b[i],1);

        Arrays.sort(ar);
        suma = n*3;
        sumb = m*3;
        long diff = suma-sumb;
        ansa = suma;
        ansb = sumb;

        for(int i=0;i<ar.length;i++){
            if(ar[i].mark == 0) suma--;
            else sumb--;
            long xx = suma - sumb;

            if(xx > diff){
                diff = xx;
                ansa = suma;
                ansb = sumb;
            }
        }

        ww.println(ansa+" "+ansb);

    }
}


import java.util.Arrays;
import java.util.Scanner;

public class VasyaBasket {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[] s1 = new int[n];
        for (int i = 0; i < n; i++) {
            s1[i] = scanner.nextInt();
        }
        int m = scanner.nextInt();
        int[] s2 = new int[m];
        for (int i = 0; i < m; i++) {
            s2[i] = scanner.nextInt();
        }
        Arrays.sort(s1);
        Arrays.sort(s2);
        int maxDiff = Integer.MIN_VALUE;
        int sa = 0, sb = 0;
        int sline = 0;
        for (int i = 0, j = 0; i < n || j < m;) {
            // compare
            while (i < n && s1[i] <= sline) {
                i++;
            }
            while (j < m && s2[j] <= sline) {
                j++;
            }
            int a = i * 2 + (n - i) * 3;
            int b = j * 2 + (m - j) * 3;
            int diff = a - b;
            if (diff > maxDiff) {
                maxDiff = diff;
                sa = a;
                sb = b;
            }
            if ( i < n ) {
                if ( s1[i] > sline + 1) {
                    sline = s1[i] - 1;
                } else {
                    sline++;
                }
            } else {
                sline = Integer.MAX_VALUE;
            }
        }
        System.out.format("%d:%d\n", sa,sb);
    }

}


import java.util.Arrays;
import java.util.Scanner;

public class VasyaBasket {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[] s1 = new int[n];
        for (int i = 0; i < n; i++) {
            s1[i] = scanner.nextInt();
        }
        int m = scanner.nextInt();
        int[] s2 = new int[m];
        for (int i = 0; i < m; i++) {
            s2[i] = scanner.nextInt();
        }
        Arrays.sort(s1);
        Arrays.sort(s2);
        int maxDiff = Integer.MIN_VALUE;
        int sa = 0, sb = 0;
        int sline = 0;
        for (int i = 0, j = 0; i < n || j < m;) {
            // compare
            while (i < n && s1[i] <= sline) {
                i++;
            }
            while (j < m && s2[j] <= sline) {
                j++;
            }
            int a = i * 2 + (n - i) * 3;
            int b = j * 2 + (m - j) * 3;
            int diff = a - b;
            if (diff > maxDiff) {
                maxDiff = diff;
                sa = a;
                sb = b;
            }
            if ( i < n - 1) {
                if ( s1[i] > sline + 1) {
                    sline = s1[i] - 1;
                } else {
                    sline++;
                }
            } else {
                sline = Integer.MAX_VALUE;
            }
        }
        System.out.format("%d:%d\n", sa,sb);
    }

}


import java.util.Arrays;
import java.util.Scanner;

public class VasyaBasket {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[] s1 = new int[n];
        for (int i = 0; i < n; i++) {
            s1[i] = scanner.nextInt();
        }
        int m = scanner.nextInt();
        int[] s2 = new int[m];
        for (int i = 0; i < m; i++) {
            s2[i] = scanner.nextInt();
        }
        Arrays.sort(s1);
        Arrays.sort(s2);
        int maxDiff = Integer.MIN_VALUE;
        int sa = 0, sb = 0;
        int sline = 0;
        for (int i = 0, j = 0; i < n || j < m;) {
            // compare
            while (i < n && s1[i] <= sline) {
                i++;
            }
            while (j < m && s2[j] <= sline) {
                j++;
            }
            int a = i * 2 + (n - i) * 3;
            int b = j * 2 + (m - j) * 3;
            int diff = a - b;
            if (diff > maxDiff) {
                maxDiff = diff;
                sa = a;
                sb = b;
            }
            if ( i < n - 1) {
                if ( s1[i] > sline + 1) {
                    sline = s1[i] - 1;
                } else {
                    sline++;
                }
            } else {
                sline = s2[m-1];
            }
        }
        System.out.format("%d:%d\n", sa,sb);
    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.StringTokenizer;

public class CF281_C {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		MyScanner in = new MyScanner();

		int nA = in.nextInt();

		ArrayList<Score> scores = new ArrayList<Score>();
		for (int i = 0; i < nA; i++) {
			Score s = new Score(in.nextInt(), true);
			scores.add(s);
		}

		int nB = in.nextInt();
		for (int i = 0; i < nB; i++) {
			Score s = new Score(in.nextInt(), false);
			scores.add(s);
		}

		Collections.sort(scores);

		long bestDiff = Long.MIN_VALUE;
		long bestA = -1;
		long bestB = -1;

		int i = 0;
		long currScoreA = 2*nA;
		long currScoreB = 2*nB;
		while (i < scores.size()) {

			// Compare
			long currDiff = currScoreA - currScoreB;
			if (currDiff > bestDiff
					|| (currDiff == bestDiff && currScoreA > bestA)) {
				bestDiff = currDiff;
				bestA = currScoreA;
				bestB = currScoreB;
			}

			// Increment
			while(true) {

				if(scores.get(i).byA) {
					currScoreA++;
				}else {
					currScoreB++;
				}

				i++;
				if(i == scores.size() || scores.get(i).dist != scores.get(i-1).dist) {
					break;
				}
			}

		}

		// Compare
		long currDiff = currScoreA - currScoreB;
		if (currDiff > bestDiff || (currDiff == bestDiff && currScoreA > bestA)) {
			bestDiff = currDiff;
			bestA = currScoreA;
			bestB = currScoreB;
		}

		System.out.printf("%d:%d\n", bestA, bestB);
	}

	public static class Score implements Comparable<Score> {

		public Score(int dist, boolean byA) {
			this.dist = dist;
			this.byA = byA;
		}

		int dist;
		boolean byA;

		@Override
		public int compareTo(Score o) {
			return -this.dist + o.dist;
		}
	}

	public static class MyScanner {
		BufferedReader br;
		StringTokenizer st;

		public MyScanner() {
			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;
		}

	}

}


import java.util.*;

public class Main{
public static void main(String[]args){
Scanner in = new Scanner(System.in);
int n1 = in.nextInt();
int arr1[] = new int[n1];
for(int i=0;i<n1;i++){
arr1[i] = in.nextInt();
}
int n2 = in.nextInt();
int arr2[] = new int[n2];
for(int i=0;i<n2;i++){
arr2[i] = in.nextInt();
}
Arrays.sort(arr1);
Arrays.sort(arr2);
int a = n1*2, b = n2*2 ;
int diff = a-b;

for(int i=0 , j=0 ; i<n1 && j < n2 ; i++){
int num = arr1[i]-1 ;
while(j < n2 && num >= arr2[j] )j++;
int A = 3*(n1-i) + i*2;
int B = 0;
if(j == n2)B = n2*2;
else B = 3*(n2-j) + j*2;

if(A-B > diff){
a = A;
b = B;
}else if(A-B == diff){
if(A > a){
a = A;
b = B;
}
}
}
System.out.println(a+":" + b);
}
}


import java.util.*;

public class Main{
public static void main(String[]args){
Scanner in = new Scanner(System.in);
int n1 = in.nextInt();
int arr1[] = new int[n1];
for(int i=0;i<n1;i++){
arr1[i] = in.nextInt();
}
int n2 = in.nextInt();
int arr2[] = new int[n2];
for(int i=0;i<n2;i++){
arr2[i] = in.nextInt();
}
Arrays.sort(arr1);
Arrays.sort(arr2);
int a = n1*2, b = n2*2 ;
int diff = a-b;

for(int i=0 , j=0 ; i<n1 && j < n2 ; i++){
int num = arr1[i]-1 ;
while(j < n2 && num >= arr2[j] )j++;
int A = 3*(n1-i) + i*2;
int B = 0;
if(j == n2)B = n2*2;
else B = 3*(n2-j) + j*2;
if(A-B > diff){
a = A;
b = B;
diff = a-b;
}else if(A-B == diff){
if(A > a){
a = A;
b = B;
}
}
}
System.out.println(a+":" + b);
}
}


import java.util.*;

public class VasyaAndBasketball {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n1 = in.nextInt();
        int arr1[] = new int[n1];
        for (int i = 0; i < n1; i++) {
            arr1[i] = in.nextInt();
        }
        int n2 = in.nextInt();
        int arr2[] = new int[n2];
        for (int i = 0; i < n2; i++) {
            arr2[i] = in.nextInt();
        }
        Arrays.sort(arr1);
        Arrays.sort(arr2);
        int mx = 0, A = 0, B = 0;
        for (int i = 0; i < n1; i++) {
            int a = 2 * (i) + 3 * (n1 - i);
            int idx = LowerBound(arr2, arr1[i] - 1, n2);
            int b = 2 * (idx + 1) + 3 * (n2 - idx - 1);
            if (mx < (a - b)) {
                mx = a - b;
                A = a;
                B = b;
            } else if (mx == (a - b)) {
                if (A < a) {
                    A = a;
                    B = b;
                }
            }
        }
        System.out.println(A + ":" + B);
    }

    public static int LowerBound(int arr[], int key, int len) {
        int lo = 0, up = len;
        while (lo < up) {
            int mid = (lo + up) / 2;
            if (arr[mid] <= key) {
                lo = mid + 1;
            } else {
                up = mid - 1;
            }
        }
        return lo - 1;
    }
}


import java.util.*;

public class VasyaAndBasketball {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n1 = in.nextInt();
        int arr1[] = new int[n1];
        for (int i = 0; i < n1; i++) {
            arr1[i] = in.nextInt();
        }
        int n2 = in.nextInt();
        int arr2[] = new int[n2];
        for (int i = 0; i < n2; i++) {
            arr2[i] = in.nextInt();
        }
        Arrays.sort(arr1);
        Arrays.sort(arr2);
        int mx = -1000000000, A = -1000000000, B = 0;
        for (int i = 0; i < n1; i++) {
            int a = 2 * (i) + 3 * (n1 - i);
            int idx = LowerBound(arr2, arr1[i] - 1, n2);
            if(arr2[idx] > arr1[i]-1)idx--;
            int b = 2 * (idx + 1) + 3 * (n2 - idx - 1);
           // System.out.println(a + " " + b + " " + (arr1[i]-1)+" "+   idx );
            if (mx < (a - b)) {
                mx = a - b;
                A = a;
                B = b;
            } else if (mx == (a - b)) {
                if (A < a) {
                    A = a;
                    B = b;
                }
            }
        }
        System.out.println(A + ":" + B);
    }

    public static int LowerBound(int arr[], int key, int len) {
        int lo = 0, up = len;
        while (lo < up) {
           // System.out.println(lo + " " + up);
            int mid = lo + (up -  lo + 1)/2;
            if (arr[mid] <= key) {
                lo = mid ;
            } else {
                up = mid - 1;
            }
        }
        return lo ;
    }
}


import java.util.*;

public class VasyaAndBasketball {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n1 = in.nextInt();
        int arr1[] = new int[n1];
        for (int i = 0; i < n1; i++) {
            arr1[i] = in.nextInt();
        }
        int n2 = in.nextInt();
        int arr2[] = new int[n2];
        for (int i = 0; i < n2; i++) {
            arr2[i] = in.nextInt();
        }
        Arrays.sort(arr1);
        Arrays.sort(arr2);
        int mx = 0, A= 0, B = 0;
        for (int i = 0; i < n1; i++) {
            int a = 2 * (i) + 3 * (n1 - i);
            int idx = LowerBound(arr2, arr1[i], n2);
            int b = 2 * (idx + 1) + 3 * (n2 - idx - 1);
            if (mx < (a - b)) {
                mx = a - b;
                A = a;
                B = b;
            } else if (mx == (a - b)) {
                if (A < a) {
                    A = a;
                    B = b;
                }
            }
        }
        System.out.println(A + ":" + B);
    }

    public static int LowerBound(int arr[], int key, int len) {
        int lo = 0, up = len;
        while (lo < up) {
            int mid = (lo + up) / 2;
            if (arr[mid] <= key) {
                lo = mid + 1;
            } else {
                up = mid - 1;
            }
        }
        return lo-1;
    }
}


import java.io.OutputStreamWriter;
import java.io.BufferedWriter;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Set;
import java.util.StringTokenizer;
import java.math.BigInteger;
import java.util.Collections;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Rafael Regis
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		FastReader in = new FastReader(inputStream);
		FastWriter out = new FastWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, FastReader in, FastWriter out) {
        int n1 = in.nextInt();

        List<Integer> l1 = new ArrayList<>();
        for (int i = 0; i < n1; i++) {
            l1.add(in.nextInt());
        }
        Collections.sort(l1);

        int n2 = in.nextInt();
        List<Integer> l2 = new ArrayList<>();
        for (int i = 0; i < n2; i++) {
            l2.add(in.nextInt());
        }
        Collections.sort(l2);

        long p1max = l1.size()*3;
        long p2min = l2.size()*3;
        long diff = p1max - p2min;

        Set<Integer> s = new HashSet<>();
        s.addAll(l1);
        s.addAll(l2);
        List<Integer> l = new ArrayList<>(s);
        Collections.sort(l);

        for (int j = 0; j < l.size(); j++) {
            int i = l.get(j);
            int x = Collections.binarySearch(l1, i);
            int y = Collections.binarySearch(l2, i);

            long p1;
            long p2;

            if (x < 0) {
                x = - x - 1;
                p1 = (x) * 2 + (n1 - x) * 3;
            } else {
                int a = l1.get(x);
                while (x < n1 && l1.get(x) == a) {
                    x++;
                }
                x--;
                p1 = (x + 1) * 2 + (n1 - x - 1) * 3;
            }

            if (y < 0) {
                y = - y - 1;
                p2 = (y) * 2 + (n2 - y) * 3;
            } else {
                int a = l2.get(y);
                while (y < n2 && l2.get(y) == a) {
                    y++;
                }
                y--;
                p2 = (y + 1) * 2 + (n2 - y - 1) * 3;
            }

            if (p1 - p2 > diff) {
                p1max = p1;
                p2min = p2;
                diff = p1 - p2;
            }
        }

        out.println(p1max + ":" + p2min);
    }
}

class FastReader {
    private BufferedReader reader;
    private StringTokenizer tokenizer;

    public FastReader(InputStream stream) {
        this.reader = new BufferedReader(new InputStreamReader(stream));
        this.tokenizer = new StringTokenizer("");
    }

    public String next() {
        return  ensureTokens() ? tokenizer.nextToken() : null;
    }

    private boolean ensureTokens() {
        while(!tokenizer.hasMoreTokens()){
            try{
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (Exception e){
                return false;
            }
        }
        return true;
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}

class FastWriter {
    private final PrintWriter printWriter;

    public FastWriter(OutputStream stream) {
        printWriter = new PrintWriter(new BufferedWriter(new OutputStreamWriter(stream)));
    }

    public void close() {
        printWriter.close();
    }

    public void println(String element) {
        printWriter.println(element);
    }

}


import java.util.List;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.math.BigDecimal;
import java.io.BufferedWriter;
import java.util.ArrayList;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.StringTokenizer;
import java.math.BigInteger;
import java.util.Collections;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Rafael Regis
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		FastReader in = new FastReader(inputStream);
		FastWriter out = new FastWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, FastReader in, FastWriter out) {
        int n1 = in.nextInt();
        List<Integer> l1 = new ArrayList<>();
        for (int i = 0; i < n1; i++) {
            l1.add(in.nextInt());
        }
        Collections.sort(l1);

        int n2 = in.nextInt();
        List<Integer> l2 = new ArrayList<>();
        for (int i = 0; i < n2; i++) {
            l2.add(in.nextInt());
        }
        Collections.sort(l2);

        long p1max = l1.size()*3;
        long p2min = l2.size()*3;
        long diff = p1max - p2min;

        for (int i = 0; i < Math.max(l1.get(l1.size() - 1), l2.get(l2.size() - 1)) + 10; i++) {
            int x = Collections.binarySearch(l1, i);
            int y = Collections.binarySearch(l2, i);

            long p1;
            long p2;

            if (x < 0) {
                x = - x - 1;
                p1 = (x) * 2 + (n1 - x) * 3;
            } else {
                int a = l1.get(x);
                while (x < n1 && l1.get(x) == a) {
                    x++;
                }
                x--;
                p1 = (x + 1) * 2 + (n1 - x - 1) * 3;
            }

            if (y < 0) {
                y = - y - 1;
                p2 = (y) * 2 + (n2 - y) * 3;
            } else {
                int a = l2.get(y);
                while (y < n2 && l2.get(y) == a) {
                    y++;
                }
                y--;
                p2 = (y + 1) * 2 + (n2 - y - 1) * 3;
            }

            if (p1 - p2 > diff) {
                p1max = p1;
                p2min = p2;
                diff = p1 - p2;
            }
        }

        out.println(p1max + ":" + p2min);
    }
}

class FastReader {
    private BufferedReader reader;
    private StringTokenizer tokenizer;

    public FastReader(InputStream stream) {
        this.reader = new BufferedReader(new InputStreamReader(stream));
        this.tokenizer = new StringTokenizer("");
    }

    public String next() {
        return  ensureTokens() ? tokenizer.nextToken() : null;
    }

    private boolean ensureTokens() {
        while(!tokenizer.hasMoreTokens()){
            try{
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (Exception e){
                return false;
            }
        }
        return true;
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}

class FastWriter {
    private final PrintWriter printWriter;

    public FastWriter(OutputStream stream) {
        printWriter = new PrintWriter(new BufferedWriter(new OutputStreamWriter(stream)));
    }

    public void close() {
        printWriter.close();
    }

    public void println(String element) {
        printWriter.println(element);
    }

}


import java.util.List;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.math.BigDecimal;
import java.io.BufferedWriter;
import java.util.ArrayList;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.StringTokenizer;
import java.math.BigInteger;
import java.util.Collections;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Rafael Regis
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		FastReader in = new FastReader(inputStream);
		FastWriter out = new FastWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, FastReader in, FastWriter out) {
        int n1 = in.nextInt();
        List<Integer> l1 = new ArrayList<>();
        for (int i = 0; i < n1; i++) {
            l1.add(in.nextInt());
        }
        Collections.sort(l1);

        int n2 = in.nextInt();
        List<Integer> l2 = new ArrayList<>();
        for (int i = 0; i < n2; i++) {
            l2.add(in.nextInt());
        }
        Collections.sort(l2);

        long p1max = l1.size()*3;
        long p2min = l2.size()*3;
        long diff = p1max - p2min;

        for (int i = Math.min(l1.get(0), l2.get(0)) - 10;
             i < Math.max(l1.get(l1.size() - 1), l2.get(l2.size() - 1)) + 10; i++) {
            int x = Collections.binarySearch(l1, i);
            int y = Collections.binarySearch(l2, i);

            long p1;
            long p2;

            if (x < 0) {
                x = - x - 1;
                p1 = (x) * 2 + (n1 - x) * 3;
            } else {
                int a = l1.get(x);
                while (x < n1 && l1.get(x) == a) {
                    x++;
                }
                x--;
                p1 = (x + 1) * 2 + (n1 - x - 1) * 3;
            }

            if (y < 0) {
                y = - y - 1;
                p2 = (y) * 2 + (n2 - y) * 3;
            } else {
                int a = l2.get(y);
                while (y < n2 && l2.get(y) == a) {
                    y++;
                }
                y--;
                p2 = (y + 1) * 2 + (n2 - y - 1) * 3;
            }

            if (p1 - p2 > diff) {
                p1max = p1;
                p2min = p2;
                diff = p1 - p2;
            }
        }

        out.println(p1max + ":" + p2min);
    }
}

class FastReader {
    private BufferedReader reader;
    private StringTokenizer tokenizer;

    public FastReader(InputStream stream) {
        this.reader = new BufferedReader(new InputStreamReader(stream));
        this.tokenizer = new StringTokenizer("");
    }

    public String next() {
        return  ensureTokens() ? tokenizer.nextToken() : null;
    }

    private boolean ensureTokens() {
        while(!tokenizer.hasMoreTokens()){
            try{
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (Exception e){
                return false;
            }
        }
        return true;
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}

class FastWriter {
    private final PrintWriter printWriter;

    public FastWriter(OutputStream stream) {
        printWriter = new PrintWriter(new BufferedWriter(new OutputStreamWriter(stream)));
    }

    public void close() {
        printWriter.close();
    }

    public void println(String element) {
        printWriter.println(element);
    }

}


import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class VasyaBasketball {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        List<Throw> throwList = new ArrayList<>();
        int n = sc.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = sc.nextInt();
            throwList.add(new Throw(true, a[i]));
        }
        int m = sc.nextInt();
        int[] b = new int[m];
        for (int i = 0; i < m; i++) {
            b[i] = sc.nextInt();
            throwList.add(new Throw(false, b[i]));
        }

        int aScore = 3 * n;
        int bScore = 3 * m;

        int maxDiff = aScore - bScore;
        int maxScore = aScore;

        int targetA = aScore;
        int targetB = bScore;

        Collections.sort(throwList);
        for (int i = 0; i < throwList.size(); i++) {
            Throw aThrow = throwList.get(i);
            if (aThrow.a) {
                aScore--;
            } else {
                bScore--;
            }
            if (i < throwList.size() - 1 && throwList.get(i + 1).pos == aThrow.pos) {
                continue;
            }
            if (aScore - bScore > maxDiff || (aScore - bScore >= maxDiff && aScore > maxScore)) {
                maxDiff = aScore - bScore;
                maxScore = aScore;
                targetA = aScore;
                targetB = bScore;
            }
        }
        System.out.println(targetA + ":" + targetB);
    }
}

class Throw implements Comparable<Throw> {
    boolean a;
    int pos;

    Throw(boolean a, int pos) {
        this.a = a;
        this.pos = pos;
    }

    @Override
    public int compareTo(Throw o) {
        return pos - o.pos;
    }
}


import java.io.*;
import java.util.*;

public class CF {
	FastScanner in;
	PrintWriter out;

	class Obj implements Comparable<Obj> {
		int pos;
		int id;

		public Obj(int pos, int id) {
			super();
			this.pos = pos;
			this.id = id;
		}

		@Override
		public int compareTo(Obj o) {
			return Integer.compare(pos, o.pos);
		}

	}

	void solve() {
		int n = in.nextInt();
		ArrayList<Obj> all = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			all.add(new Obj(in.nextInt(), 0));
		}
		int m = in.nextInt();
		for (int i = 0; i < m; i++) {
			all.add(new Obj(in.nextInt(), 1));
		}
		Collections.sort(all);
		int curA = 0, curB = 0;
		int curD = 0;
		for (Obj o : all) {
			if (o.id == 0) {
				if (o.pos <= curD) {
					curA += 2;
				} else {
					curA += 3;
				}
			} else {
				if (o.pos <= curD) {
					curB += 2;
				} else {
					curB += 3;
				}
			}
		}
		int bestA = curA;
		int bestB = curB;
		for (int i = 0; i < all.size();) {
			while (i < all.size() && all.get(i).pos <= curD) {
				i++;
			}
			if (i == all.size())
				break;
			curD = all.get(i).pos;
			for (int j = i; j < all.size() && all.get(j).pos == curD; j++) {
				if (all.get(j).id == 0) {
					curA--;
				} else {
					curB--;
				}
			}
			if (curA - curB > bestA - bestB) {
				bestA = curA;
				bestB = curB;
			}
			if (curA - curB == bestA - bestB && curA > bestA) {
				bestA = curA;
				bestB = curB;
			}
		}
		out.println(bestA + ":" + bestB);
	}

	void runIO() {

		in = new FastScanner(System.in);
		out = new PrintWriter(System.out);

		solve();

		out.close();
	}

	class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner(File f) {
			try {
				br = new BufferedReader(new FileReader(f));
			} catch (FileNotFoundException e) {
				e.printStackTrace();
			}
		}

		public FastScanner(InputStream f) {
			br = new BufferedReader(new InputStreamReader(f));
		}

		String next() {
			while (st == null || !st.hasMoreTokens()) {
				String s = null;
				try {
					s = br.readLine();
				} catch (IOException e) {
					e.printStackTrace();
				}
				if (s == null)
					return null;
				st = new StringTokenizer(s);
			}
			return st.nextToken();
		}

		boolean hasMoreTokens() {
			while (st == null || !st.hasMoreTokens()) {
				String s = null;
				try {
					s = br.readLine();
				} catch (IOException e) {
					e.printStackTrace();
				}
				if (s == null)
					return false;
				st = new StringTokenizer(s);
			}
			return true;
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}
	}

	public static void main(String[] args) {
		new CF().runIO();
	}
}


import java.util.*;
import java.lang.reflect.Array;
import java.math.*;
import java.io.*;
import java.awt.*;

public class Main{
    static FastReader in = new FastReader(new BufferedReader(new InputStreamReader(System.in)));
    static PrintWriter out = new PrintWriter(System.out);
    static final int maxn = (int)2e5 + 11;
    static int inf = (1<<30) - 1;
    static int n,m;
    static int a[] = new int[maxn];
    static int b[] = new int[maxn];
    static int c[] = new int[2*maxn];

    public static void solve() throws Exception {
        n = in.nextInt();
        for (int i=1; i<=n; i++) {
            a[i] = in.nextInt();
            c[i] = a[i];
        }

        m = in.nextInt();
        for (int i=1; i<=m; i++) {
            b[i] = in.nextInt();
            c[n+i] = b[i];
        }

        Arrays.sort(a,1,n+1);
        Arrays.sort(b,1,m+1);
        Arrays.sort(c,1,n+m+1+1);

        int max = -inf;
        int ansl = 0;
        int ansr = 0;
        for (int i=1; i<=n+m; i++) {
            int l = binSearchLeft(c[i]);
            int r = binSearchRight(c[i]);
            l = (l*2)+(n-l)*3;
            r = (r*2)+(m-r)*3;
            if (Math.abs(l-r)>max) {
                max = Math.abs(l-r);
                ansl = l;
                ansr = r;
            } else if (Math.abs(l-r)==max) {
                if (ansl<l) {
                    ansl = l;
                    ansr = r;
                }
            }
        }

        out.println(ansl + ":" + ansr);

    }

    private static int binSearchRight(int num) {
        int left = 1;
        int right = m;
        while(left<=right) {
            int mid = (left+right)/2;
            if (b[mid]<=num) {
                left = mid+1;
            } else {
                right = mid-1;
            }
        }
        return left-1;
    }

    private static int binSearchLeft(int num) {
        int left = 1;
        int right = n;
        while(left<=right) {
            int mid = (left+right)/2;
            if (a[mid]<=num) {
                left = mid+1;
            } else {
                right = mid-1;
            }
        }
        return left-1;
    }

    public static void main (String args[]) throws Exception {
        solve();
        out.close();
    }

}

class Pair implements Comparable<Pair> {
    int x,y;
    public Pair (int x, int y) {
        this.x = x;
        this.y = y;
    }

    @Override
    public int compareTo(Pair p) {
        if (this.y<p.y) {
            return -1;
        } else if (this.y == p.y) {
            return 0;
        } else {
            return 1;
        }
    }

}

class FastReader {

    BufferedReader bf;
    StringTokenizer tk = null;
    String DELIM = " ";

    public FastReader(BufferedReader bf) {
        this.bf = bf;
    }

    public String nextToken() throws Exception {

        if(tk==null || !tk.hasMoreTokens()) {
            tk = new StringTokenizer(bf.readLine(),DELIM);
        }
        return tk.nextToken();
    }

    public int nextInt() throws Exception {
        return Integer.parseInt(nextToken());
    }

    public long nextLong() throws Exception {
        return Long.parseLong(nextToken());
    }

    public double nextDouble() throws Exception {
        return Double.parseDouble(nextToken());
    }
}


import java.util.*;
import java.lang.reflect.Array;
import java.math.*;
import java.io.*;
import java.awt.*;

public class Main{
    static FastReader in = new FastReader(new BufferedReader(new InputStreamReader(System.in)));
    static PrintWriter out = new PrintWriter(System.out);
    static final int maxn = (int)2e5 + 11;
    static int inf = (1<<30) - 1;
    static int n,m;
    static int a[] = new int[maxn];
    static int b[] = new int[maxn];
    static int c[] = new int[2*maxn];

    public static void solve() throws Exception {
        n = in.nextInt();
        for (int i=1; i<=n; i++) {
            a[i] = in.nextInt();
            c[i] = a[i];
        }

        m = in.nextInt();
        for (int i=1; i<=m; i++) {
            b[i] = in.nextInt();
            c[n+i] = b[i];
        }

        Arrays.sort(a,1,n+1);
        Arrays.sort(b,1,m+1);
        Arrays.sort(c,1,n+m+1+1);

        int max = -inf;
        int ansl = 0;
        int ansr = 0;
        for (int i=1; i<=n+m+1; i++) {
            int l = binSearchLeft(c[i]);
            int r = binSearchRight(c[i]);
            l = (l*2)+(n-l)*3;
            r = (r*2)+(m-r)*3;
            if (l-r>max) {
                max = Math.abs(l-r);
                ansl = l;
                ansr = r;
            } else if (l-r==max) {
                if (ansl<l) {
                    ansl = l;
                    ansr = r;
                }
            }
        }

        out.println(ansl + ":" + ansr);

    }

    private static int binSearchRight(int num) {
        int left = 1;
        int right = m;
        while(left<=right) {
            int mid = (left+right)/2;
            if (b[mid]<=num) {
                left = mid+1;
            } else {
                right = mid-1;
            }
        }
        return left-1;
    }

    private static int binSearchLeft(int num) {
        int left = 1;
        int right = n;
        while(left<=right) {
            int mid = (left+right)/2;
            if (a[mid]<=num) {
                left = mid+1;
            } else {
                right = mid-1;
            }
        }
        return left-1;
    }

    public static void main (String args[]) throws Exception {
        solve();
        out.close();
    }

}

class Pair implements Comparable<Pair> {
    int x,y;
    public Pair (int x, int y) {
        this.x = x;
        this.y = y;
    }

    @Override
    public int compareTo(Pair p) {
        if (this.y<p.y) {
            return -1;
        } else if (this.y == p.y) {
            return 0;
        } else {
            return 1;
        }
    }

}

class FastReader {

    BufferedReader bf;
    StringTokenizer tk = null;
    String DELIM = " ";

    public FastReader(BufferedReader bf) {
        this.bf = bf;
    }

    public String nextToken() throws Exception {

        if(tk==null || !tk.hasMoreTokens()) {
            tk = new StringTokenizer(bf.readLine(),DELIM);
        }
        return tk.nextToken();
    }

    public int nextInt() throws Exception {
        return Integer.parseInt(nextToken());
    }

    public long nextLong() throws Exception {
        return Long.parseLong(nextToken());
    }

    public double nextDouble() throws Exception {
        return Double.parseDouble(nextToken());
    }
}


import java.util.*;
import java.lang.reflect.Array;
import java.math.*;
import java.io.*;
import java.awt.*;

public class Main{
    static FastReader in = new FastReader(new BufferedReader(new InputStreamReader(System.in)));
    static PrintWriter out = new PrintWriter(System.out);
    static final int maxn = (int)2e5 + 11;
    static int inf = (1<<30) - 1;
    static int n,m;
    static int a[] = new int[maxn];
    static int b[] = new int[maxn];
    static int c[] = new int[2*maxn];

    public static void solve() throws Exception {
        n = in.nextInt();
        for (int i=1; i<=n; i++) {
            a[i] = in.nextInt();
            c[i] = a[i];
        }

        m = in.nextInt();
        for (int i=1; i<=m; i++) {
            b[i] = in.nextInt();
            c[n+i] = b[i];
        }

        Arrays.sort(a,1,n+1);
        Arrays.sort(b,1,m+1);
        Arrays.sort(c,1,n+m+1+1);

        int max = -inf;
        int ansl = 0;
        int ansr = 0;
        for (int i=1; i<=n+m+1; i++) {
            int l = binSearchLeft(c[i]);
            int r = binSearchRight(c[i]);
            l = (l*2)+(n-l)*3;
            r = (r*2)+(m-r)*3;
            if (Math.abs(l-r)>max) {
                max = Math.abs(l-r);
                ansl = l;
                ansr = r;
            } else if (Math.abs(l-r)==max) {
                if (ansl<l) {
                    ansl = l;
                    ansr = r;
                }
            }
        }

        out.println(ansl + ":" + ansr);

    }

    private static int binSearchRight(int num) {
        int left = 1;
        int right = m;
        while(left<=right) {
            int mid = (left+right)/2;
            if (b[mid]<=num) {
                left = mid+1;
            } else {
                right = mid-1;
            }
        }
        return left-1;
    }

    private static int binSearchLeft(int num) {
        int left = 1;
        int right = n;
        while(left<=right) {
            int mid = (left+right)/2;
            if (a[mid]<=num) {
                left = mid+1;
            } else {
                right = mid-1;
            }
        }
        return left-1;
    }

    public static void main (String args[]) throws Exception {
        solve();
        out.close();
    }

}

class Pair implements Comparable<Pair> {
    int x,y;
    public Pair (int x, int y) {
        this.x = x;
        this.y = y;
    }

    @Override
    public int compareTo(Pair p) {
        if (this.y<p.y) {
            return -1;
        } else if (this.y == p.y) {
            return 0;
        } else {
            return 1;
        }
    }

}

class FastReader {

    BufferedReader bf;
    StringTokenizer tk = null;
    String DELIM = " ";

    public FastReader(BufferedReader bf) {
        this.bf = bf;
    }

    public String nextToken() throws Exception {

        if(tk==null || !tk.hasMoreTokens()) {
            tk = new StringTokenizer(bf.readLine(),DELIM);
        }
        return tk.nextToken();
    }

    public int nextInt() throws Exception {
        return Integer.parseInt(nextToken());
    }

    public long nextLong() throws Exception {
        return Long.parseLong(nextToken());
    }

    public double nextDouble() throws Exception {
        return Double.parseDouble(nextToken());
    }
}


import java.util.*;
import java.lang.reflect.Array;
import java.math.*;
import java.io.*;
import java.awt.*;

public class Main{
    static FastReader in = new FastReader(new BufferedReader(new InputStreamReader(System.in)));
    static PrintWriter out = new PrintWriter(System.out);
    static final int maxn = (int)2e5 + 11;
    static int inf = (1<<30) - 1;
    static int n,m;
    static int a[] = new int[maxn];
    static int b[] = new int[maxn];
    static int c[] = new int[2*maxn];

    public static void solve() throws Exception {
        n = in.nextInt();
        for (int i=1; i<=n; i++) {
            a[i] = in.nextInt();
            c[i] = a[i];
        }

        m = in.nextInt();
        for (int i=1; i<=m; i++) {
            b[i] = in.nextInt();
            c[n+i] = b[i];
        }

        Arrays.sort(a,1,n+1);
        Arrays.sort(b,1,m+1);
        Arrays.sort(c,1,n+m+1+1);

        int max = -inf;
        int ansl = 0;
        int ansr = 0;
        for (int i=1; i<=n+m+1; i++) {
            int l = binSearchLeft(c[i]);
            int r = binSearchRight(c[i]);
            l = (l*2)+(n-l)*3;
            r = (r*2)+(m-r)*3;
            if (l-r>max) {
                max = l-r;
                ansl = l;
                ansr = r;
            } else if (l-r==max) {
                if (ansl<l) {
                    ansl = l;
                    ansr = r;
                }
            }
        }

        out.println(ansl + ":" + ansr);

    }

    private static int binSearchRight(int num) {
        int left = 1;
        int right = m;
        while(left<=right) {
            int mid = (left+right)/2;
            if (b[mid]<=num) {
                left = mid+1;
            } else {
                right = mid-1;
            }
        }
        return left-1;
    }

    private static int binSearchLeft(int num) {
        int left = 1;
        int right = n;
        while(left<=right) {
            int mid = (left+right)/2;
            if (a[mid]<=num) {
                left = mid+1;
            } else {
                right = mid-1;
            }
        }
        return left-1;
    }

    public static void main (String args[]) throws Exception {
        solve();
        out.close();
    }

}

class Pair implements Comparable<Pair> {
    int x,y;
    public Pair (int x, int y) {
        this.x = x;
        this.y = y;
    }

    @Override
    public int compareTo(Pair p) {
        if (this.y<p.y) {
            return -1;
        } else if (this.y == p.y) {
            return 0;
        } else {
            return 1;
        }
    }

}

class FastReader {

    BufferedReader bf;
    StringTokenizer tk = null;
    String DELIM = " ";

    public FastReader(BufferedReader bf) {
        this.bf = bf;
    }

    public String nextToken() throws Exception {

        if(tk==null || !tk.hasMoreTokens()) {
            tk = new StringTokenizer(bf.readLine(),DELIM);
        }
        return tk.nextToken();
    }

    public int nextInt() throws Exception {
        return Integer.parseInt(nextToken());
    }

    public long nextLong() throws Exception {
        return Long.parseLong(nextToken());
    }

    public double nextDouble() throws Exception {
        return Double.parseDouble(nextToken());
    }
}


import java.util.*;
import java.lang.reflect.Array;
import java.math.*;
import java.io.*;
import java.awt.*;

public class Main{
    static FastReader in = new FastReader(new BufferedReader(new InputStreamReader(System.in)));
    static PrintWriter out = new PrintWriter(System.out);
    static final int maxn = (int)2e5 + 11;
    static int inf = (1<<30) - 1;
    static int n,m;
    static int a[] = new int[maxn];
    static int b[] = new int[maxn];
    static int c[] = new int[maxn];

    public static void solve() throws Exception {
        n = in.nextInt();
        for (int i=1; i<=n; i++) {
            a[i] = in.nextInt();
            c[i] = a[i];
        }

        m = in.nextInt();
        for (int i=1; i<=m; i++) {
            b[i] = in.nextInt();
            c[n+i] = b[i];
        }

        Arrays.sort(a,1,n+1);
        Arrays.sort(b,1,m+1);
        Arrays.sort(c,1,n+m+1+1);

        int max = -inf;
        int ansl = 0;
        int ansr = 0;
        for (int i=1; i<=n+m; i++) {
            int l = binSearchLeft(c[i]);
            int r = binSearchRight(c[i]);
            l = (l*2)+(n-l)*3;
            r = (r*2)+(m-r)*3;
            if (Math.abs(l-r)>max) {
                max = Math.abs(l-r);
                ansl = l;
                ansr = r;
            }
        }

        out.println(ansl + ":" + ansr);

    }

    private static int binSearchRight(int num) {
        int left = 1;
        int right = m;
        while(left<=right) {
            int mid = (left+right)/2;
            if (b[mid]<=num) {
                left = mid+1;
            } else {
                right = mid-1;
            }
        }
        return left-1;
    }

    private static int binSearchLeft(int num) {
        int left = 1;
        int right = n;
        while(left<=right) {
            int mid = (left+right)/2;
            if (a[mid]<=num) {
                left = mid+1;
            } else {
                right = mid-1;
            }
        }
        return left-1;
    }

    public static void main (String args[]) throws Exception {
        solve();
        out.close();
    }

}

class Pair implements Comparable<Pair> {
    int x,y;
    public Pair (int x, int y) {
        this.x = x;
        this.y = y;
    }

    @Override
    public int compareTo(Pair p) {
        if (this.y<p.y) {
            return -1;
        } else if (this.y == p.y) {
            return 0;
        } else {
            return 1;
        }
    }

}

class FastReader {

    BufferedReader bf;
    StringTokenizer tk = null;
    String DELIM = " ";

    public FastReader(BufferedReader bf) {
        this.bf = bf;
    }

    public String nextToken() throws Exception {

        if(tk==null || !tk.hasMoreTokens()) {
            tk = new StringTokenizer(bf.readLine(),DELIM);
        }
        return tk.nextToken();
    }

    public int nextInt() throws Exception {
        return Integer.parseInt(nextToken());
    }

    public long nextLong() throws Exception {
        return Long.parseLong(nextToken());
    }

    public double nextDouble() throws Exception {
        return Double.parseDouble(nextToken());
    }
}


import java.io.*;
import java.util.*;

/**
 *
 * @author ehab
 */

public class JavaApplication7 {

   static int binar(Integer ar[] , int k){
   int min = 0 ;
   int max = ar.length - 1 ;
   int l = -1 ;
   while(min <= max)
   {
     int mid = (min+max)/2 ;
     if(ar[mid] <= k)
     {
      l = mid ;
      min = mid + 1;

     }
     else max = mid - 1 ;

   }
   return l+1 ;
   }
    public static void main(String[] args) throws Exception
    {

        StringBuilder ans = new StringBuilder() ;
        BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)) ;
        int n = Integer.parseInt(bf.readLine()) ;
        StringTokenizer st = new StringTokenizer(bf.readLine()) ;
        Integer ar1 [] = new Integer[n] ;
        for(int i = 0 ; i < n ; i ++ )
            ar1[i] = Integer.parseInt(st.nextToken()) ;

        int m = Integer.parseInt(bf.readLine()) ;
         st = new StringTokenizer(bf.readLine()) ;
        Integer ar2 [] = new Integer[m] ;
        for(int i = 0 ; i < m ; i ++ )
            ar2[i] = Integer.parseInt(st.nextToken()) ;
        Arrays.sort(ar2);
        Arrays.sort(ar1);
        int can [] = new int [3*(n+m)] ;
        int z = 0 ;
        for(int i = 0 ; i < n ; i++)
        {can[z++] = ar1[i]  ; can[z++] = ar1[i] -1 ;can[z++] = ar1[i] + 1;}
        for(int i = 0 ; i < m ; i++)
        {can[z++] = ar2[i]  ; can[z++] = ar2[i] -1 ;can[z++] = ar2[i] + 1;}
        int max = -999999999 ;
        int an1 = -1, an2 = -1 ;
        for(int i = 0 ; i < z ; i++){
            int a1 = binar(ar1,can[i]) , a2 = binar(ar2,can[i]) ;

            a1 = 2*a1 + 3 *(n-a1) ;
            a2 = 2*a2 + 3 *(m-a2) ;

            int s = a1 - a2 ;
            if(max <= s )
            {
             max = s ;

            }
        }
          for(int i = 0 ; i < z ; i++){
            int a1 = binar(ar1,can[i]) , a2 = binar(ar2,can[i]) ;

            a1 = 2*a1 + 3 *(n-a1) ;
            a2 = 2*a2 + 3 *(m-a2) ;

            int s = a1 - a2 ;
            if(max == s )
            {

             if(an1 < a1 )
             {
             an1 = a1 ;
             an2 = a2 ;
             }

            }
        }
        System.out.println(an1+":"+an2);

    }
    }


import java.io.*;
import java.util.*;

/**
 *
 * @author ehab
 */

public class JavaApplication7 {

   static int binar(Integer ar[] , int k){
   int min = 0 ;
   int max = ar.length - 1 ;
   int l = -1 ;
   while(min <= max)
   {
     int mid = (min+max)/2 ;
     if(ar[mid] <= k)
     {
      l = mid ;
      min = mid + 1;

     }
     else max = mid - 1 ;

   }
   return l+1 ;
   }
    public static void main(String[] args) throws Exception
    {

        StringBuilder ans = new StringBuilder() ;
        BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)) ;
        int n = Integer.parseInt(bf.readLine()) ;
        StringTokenizer st = new StringTokenizer(bf.readLine()) ;
        Integer ar1 [] = new Integer[n] ;
        for(int i = 0 ; i < n ; i ++ )
            ar1[i] = Integer.parseInt(st.nextToken()) ;

        int m = Integer.parseInt(bf.readLine()) ;
         st = new StringTokenizer(bf.readLine()) ;
        Integer ar2 [] = new Integer[m] ;
        for(int i = 0 ; i < m ; i ++ )
            ar2[i] = Integer.parseInt(st.nextToken()) ;
        Arrays.sort(ar2);
        Arrays.sort(ar1);
        int can [] = new int [3*(n+m)] ;
        int z = 0 ;
        for(int i = 0 ; i < n ; i++)
        {can[z++] = ar1[i]  ; can[z++] = ar1[i] -1 ;can[z++] = ar1[i] + 1;}
        for(int i = 0 ; i < m ; i++)
        {can[z++] = ar2[i]  ; can[z++] = ar2[i] -1 ;can[z++] = ar2[i] + 1;}
        int max = 0 ;
        int an1 = -1, an2 = -1 ;
        for(int i = 0 ; i < z ; i++){
            int a1 = binar(ar1,can[i]) , a2 = binar(ar2,can[i]) ;

            a1 = 2*a1 + 3 *(n-a1) ;
            a2 = 2*a2 + 3 *(m-a2) ;
            int s = a1 - a2 ;
            if(max <= s )
            {
             max = s ;
             if(max != s)
             { an1 = a1 ;
               an2 = a2 ;
             }
             else

              if(an1 < a1)
              {
               an1 = a1 ; an2 = a2 ;

              }

            }
        }
        System.out.println(an1+":"+an2);

    }
    }


import java.io.*;
import java.util.*;

/**
 *
 * @author ehab
 */

public class JavaApplication7 {

   static int binar(Integer ar[] , int k){
   int min = 0 ;
   int max = ar.length - 1 ;
   int l = -1 ;
   while(min <= max)
   {
     int mid = (min+max)/2 ;
     if(ar[mid] <= k)
     {
      l = mid ;
      min = mid + 1;

     }
     else max = mid - 1 ;

   }
   return l+1 ;
   }
    public static void main(String[] args) throws Exception
    {

        StringBuilder ans = new StringBuilder() ;
        BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)) ;
        int n = Integer.parseInt(bf.readLine()) ;
        StringTokenizer st = new StringTokenizer(bf.readLine()) ;
        Integer ar1 [] = new Integer[n] ;
        for(int i = 0 ; i < n ; i ++ )
            ar1[i] = Integer.parseInt(st.nextToken()) ;

        int m = Integer.parseInt(bf.readLine()) ;
         st = new StringTokenizer(bf.readLine()) ;
        Integer ar2 [] = new Integer[m] ;
        for(int i = 0 ; i < m ; i ++ )
            ar2[i] = Integer.parseInt(st.nextToken()) ;
        Arrays.sort(ar2);
        Arrays.sort(ar1);
        int can [] = new int [3*(n+m)] ;
        int z = 0 ;
        for(int i = 0 ; i < n ; i++)
        {can[z++] = ar1[i]  ; can[z++] = ar1[i] -1 ;can[z++] = ar1[i] + 1;}
        for(int i = 0 ; i < m ; i++)
        {can[z++] = ar2[i]  ; can[z++] = ar2[i] -1 ;can[z++] = ar2[i] + 1;}
        int max = -999999999 ;
        int an1 = -1, an2 = -1 ;
        for(int i = 0 ; i < z ; i++){
            int a1 = binar(ar1,can[i]) , a2 = binar(ar2,can[i]) ;

            a1 = 2*a1 + 3 *(n-a1) ;
            a2 = 2*a2 + 3 *(m-a2) ;
            int s = a1 - a2 ;
            if(max <= s )
            {
             max = s ;
             if(max != s)
             { an1 = a1 ;
               an2 = a2 ;
             }
             else

              if(an1 < a1)
              {
               an1 = a1 ; an2 = a2 ;

              }

            }
        }
        System.out.println(an1+":"+an2);

    }
    }


import java.io.*;
import java.util.*;

/**
 *
 * @author ehab
 */

public class JavaApplication7 {

   static int binar(Integer ar[] , int k){
   int min = 0 ;
   int max = ar.length - 1 ;
   int l = -1 ;
   while(min <= max)
   {
     int mid = (min+max)/2 ;
     if(ar[mid] <= k)
     {
      l = mid ;
      min = mid + 1;

     }
     else max = mid - 1 ;

   }
   return l+1 ;
   }
    public static void main(String[] args) throws Exception
    {

        StringBuilder ans = new StringBuilder() ;
        BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)) ;
        int n = Integer.parseInt(bf.readLine()) ;
        StringTokenizer st = new StringTokenizer(bf.readLine()) ;
        Integer ar1 [] = new Integer[n] ;
        for(int i = 0 ; i < n ; i ++ )
            ar1[i] = Integer.parseInt(st.nextToken()) ;

        int m = Integer.parseInt(bf.readLine()) ;
         st = new StringTokenizer(bf.readLine()) ;
        Integer ar2 [] = new Integer[m] ;
        for(int i = 0 ; i < m ; i ++ )
            ar2[i] = Integer.parseInt(st.nextToken()) ;
        Arrays.sort(ar2);
        Arrays.sort(ar1);
        int can [] = new int [3*n*m] ;
        int z = 0 ;
        for(int i = 0 ; i < n ; i++)
        {can[z++] = ar1[i]  ; can[z++] = ar1[i] -1 ;can[z++] = ar1[i] + 1;}
        for(int i = 0 ; i < m ; i++)
        {can[z++] = ar2[i]  ; can[z++] = ar2[i] -1 ;can[z++] = ar2[i] + 1;}
        int max = 0 ;
        int an1 = -1, an2 = -1 ;
        for(int i = 0 ; i < z ; i++){
            int a1 = binar(ar1,can[i]) , a2 = binar(ar2,can[i]) ;

            a1 = 2*a1 + 3 *(n-a1) ;
            a2 = 2*a2 + 3 *(m-a2) ;
            int s = a1 - a2 ;
            if(max <= s )
            {
             max = s ;
             if(max != s)
             { an1 = a1 ;
               an2 = a2 ;
             }
             else

              if(an1 < a1)
              {
               an1 = a1 ; an2 = a2 ;

              }

            }
        }
        System.out.println(an1+":"+an2);

    }
    }


import java.io.*;
import java.util.Arrays;

public class C281_C {
    public static void main(String []args) {
        new Solution().solve();
    }
}

class Solution {
    FastReader fr = new FastReader();
    BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

    public void solve() {

        int n = fr.nextInt();
        long []a = new long[n];
        for (int i = 0; i < n; i++) {
            a[i] = fr.nextLong();
        }

        int m = fr.nextInt();
        long []b = new long[m];
        for (int i = 0; i < m; i++) {
            b[i] = fr.nextLong();
        }

        Arrays.sort(a);
        Arrays.sort(b);

        long aMax = 0;
        long bMax = 0;

        int i = 0, u = 0;

        while (i < n && u < m) {
            long next = Math.min(a[i], b[u]);
            if (i*2 +(n-i)*3 - (u*2 + (m-u)*3) > aMax*2 + (n-aMax)*3 - (bMax*2 + (m-bMax)*3)) {
                aMax = i;
                bMax = u;
            }

            int addA = 0, addB = 0;
            while (i + addA < n && a[i+addA] == next) addA++;
            while (u + addB < m && b[u+addB] == next) addB++;

            i += addA;
            u += addB;
        }

        if (i*2 +(n-i)*3 - (u*2 + (m-u)*3) > aMax*2 + (n-aMax)*3 - (bMax*2 + (m-bMax)*3)) {
            aMax = i;
            bMax = u;
        }

        System.out.println((aMax * 2 + (n - aMax) * 3) + ":" + (bMax * 2 + (m - bMax) * 3));
    }
}

class FastReader {
    private InputStream is = new BufferedInputStream(System.in);
    private int bufferSize = 1 << 17;
    private byte []buffer = new byte[bufferSize];
    private int currentIndex = 0;
    private int lastIndex = 0;

    public int nextInt() {
        int result = 0;
        int minus = 1;

        byte character = readNext();

        while (character == ' ' || character == '\n' || character == '\r') {
            character = readNext();
        }

        if (character == '-') {
            minus = -1;
            character = readNext();
        }

        while (character != ' ' && character != '\n' && character != '\r') {
            result = result * 10 + (character - '0');
            character = readNext();
        }

        return minus*result;
    }

    public long nextLong() {
        long result = 0;
        int minus = 1;

        byte character = readNext();

        while (character == ' ' || character == '\n' || character == '\r') {
            character = readNext();
        }

        if (character == '-') {
            minus = -1;
            character = readNext();
        }

        while (character != ' ' && character != '\n' && character != '\r') {
            result = result * 10 + (character - '0');
            character = readNext();
        }

        return minus*result;
    }

    public String nextString() {
        StringBuffer result = new StringBuffer();

        byte character = readNext();

        while (character == ' ' || character == '\n' || character == '\r') {
            character = readNext();
        }

        while (character != ' ' && character != '\n' && character != '\r') {
            result.append((char)character);
            character = readNext();
        }

        return result.toString();
    }

    public String nextLine() {
        StringBuffer result = new StringBuffer();

        byte character = readNext();

        while (character == '\n' || character == '\r') {
            character = readNext();
        }

        while (character != '\n' && character != '\r') {
            result.append((char)character);
            character = readNext();
        }

        return result.toString();
    }

    private byte readNext() {
        if (currentIndex == lastIndex) {
            try {
                lastIndex = is.read(buffer, 0, bufferSize);
            } catch (IOException e) {
                throw new RuntimeException("What?");
            }
            if (lastIndex == -1) {
                buffer[0] = -1;
            }
            currentIndex = 0;
        }

        return buffer[currentIndex++];
    }
}


import java.io.*;

public class C281_C {
    public static void main(String []args) {
        new Solution().solve();
    }
}

class Solution {
    FastReader fr = new FastReader();
    BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

    public void solve() {

        int n = fr.nextInt();
        long []a = new long[n];
        for (int i = 0; i < n; i++) {
            a[i] = fr.nextLong();
        }

        int m = fr.nextInt();
        long []b = new long[m];
        for (int i = 0; i < m; i++) {
            b[i] = fr.nextLong();
        }

        long aMax = 0;
        long bMax = 0;

        int i = 0, u = 0;

        while (i < n && u < m) {
            long next = Math.min(a[i], b[u]);
            if (i*2 +(n-i)*3 - (u*2 + (m-u)*3) > aMax*2 + (n-aMax)*3 - (bMax*2 + (m-bMax)*3)) {
                aMax = i;
                bMax = u;
            }

            int addA = 0, addB = 0;
            while (i + addA < n && a[i+addA] == next) addA++;
            while (u + addB < m && b[u+addB] == next) addB++;

            i += addA;
            u += addB;
        }

        if (i*2 +(n-i)*3 - (u*2 + (m-u)*3) > aMax*2 + (n-aMax)*3 - (bMax*2 + (m-bMax)*3)) {
            aMax = i;
            bMax = u;
        }

        System.out.println((aMax * 2 + (n - aMax) * 3) + ":" + (bMax * 2 + (m - bMax) * 3));
    }
}

class FastReader {
    private InputStream is = new BufferedInputStream(System.in);
    private int bufferSize = 1 << 17;
    private byte []buffer = new byte[bufferSize];
    private int currentIndex = 0;
    private int lastIndex = 0;

    public int nextInt() {
        int result = 0;
        int minus = 1;

        byte character = readNext();

        while (character == ' ' || character == '\n' || character == '\r') {
            character = readNext();
        }

        if (character == '-') {
            minus = -1;
            character = readNext();
        }

        while (character != ' ' && character != '\n' && character != '\r') {
            result = result * 10 + (character - '0');
            character = readNext();
        }

        return minus*result;
    }

    public long nextLong() {
        long result = 0;
        int minus = 1;

        byte character = readNext();

        while (character == ' ' || character == '\n' || character == '\r') {
            character = readNext();
        }

        if (character == '-') {
            minus = -1;
            character = readNext();
        }

        while (character != ' ' && character != '\n' && character != '\r') {
            result = result * 10 + (character - '0');
            character = readNext();
        }

        return minus*result;
    }

    public String nextString() {
        StringBuffer result = new StringBuffer();

        byte character = readNext();

        while (character == ' ' || character == '\n' || character == '\r') {
            character = readNext();
        }

        while (character != ' ' && character != '\n' && character != '\r') {
            result.append((char)character);
            character = readNext();
        }

        return result.toString();
    }

    public String nextLine() {
        StringBuffer result = new StringBuffer();

        byte character = readNext();

        while (character == '\n' || character == '\r') {
            character = readNext();
        }

        while (character != '\n' && character != '\r') {
            result.append((char)character);
            character = readNext();
        }

        return result.toString();
    }

    private byte readNext() {
        if (currentIndex == lastIndex) {
            try {
                lastIndex = is.read(buffer, 0, bufferSize);
            } catch (IOException e) {
                throw new RuntimeException("What?");
            }
            if (lastIndex == -1) {
                buffer[0] = -1;
            }
            currentIndex = 0;
        }

        return buffer[currentIndex++];
    }
}


import java.io.*;

public class C281_C {
    public static void main(String []args) {
        new Solution().solve();
    }
}

class Solution {
    FastReader fr = new FastReader();
    BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

    public void solve() {

        int n = fr.nextInt();
        long []a = new long[n];
        for (int i = 0; i < n; i++) {
            a[i] = fr.nextLong();
        }

        int m = fr.nextInt();
        long []b = new long[m];
        for (int i = 0; i < m; i++) {
            b[i] = fr.nextLong();
        }

        long aMax = 0;
        long bMax = 0;

        int i = 0, u = 0;

        while (i < n && u < m) {
            long next = Math.min(a[i], b[u]);
            if (i*2 +(n-i)*3 - (u*2 + (m-u)*3) >= aMax*2 + (n-aMax)*3 - (bMax*2 + (m-bMax)*3)) {
                aMax = i;
                bMax = u;
            }

            int addA = 0, addB = 0;
            while (i + addA < n && a[i+addA] == next) addA++;
            while (u + addB < m && b[u+addB] == next) addB++;

            i += addA;
            u += addB;
        }

        if (i*2 +(n-i)*3 - (u*2 + (m-u)*3) >= aMax*2 + (n-aMax)*3 - (bMax*2 + (m-bMax)*3)) {
            aMax = i;
            bMax = u;
        }

        System.out.println((aMax * 2 + (n - aMax) * 3) + ":" + (bMax * 2 + (m - bMax) * 3));
    }
}

class FastReader {
    private InputStream is = new BufferedInputStream(System.in);
    private int bufferSize = 1 << 17;
    private byte []buffer = new byte[bufferSize];
    private int currentIndex = 0;
    private int lastIndex = 0;

    public int nextInt() {
        int result = 0;
        int minus = 1;

        byte character = readNext();

        while (character == ' ' || character == '\n' || character == '\r') {
            character = readNext();
        }

        if (character == '-') {
            minus = -1;
            character = readNext();
        }

        while (character != ' ' && character != '\n' && character != '\r') {
            result = result * 10 + (character - '0');
            character = readNext();
        }

        return minus*result;
    }

    public long nextLong() {
        long result = 0;
        int minus = 1;

        byte character = readNext();

        while (character == ' ' || character == '\n' || character == '\r') {
            character = readNext();
        }

        if (character == '-') {
            minus = -1;
            character = readNext();
        }

        while (character != ' ' && character != '\n' && character != '\r') {
            result = result * 10 + (character - '0');
            character = readNext();
        }

        return minus*result;
    }

    public String nextString() {
        StringBuffer result = new StringBuffer();

        byte character = readNext();

        while (character == ' ' || character == '\n' || character == '\r') {
            character = readNext();
        }

        while (character != ' ' && character != '\n' && character != '\r') {
            result.append((char)character);
            character = readNext();
        }

        return result.toString();
    }

    public String nextLine() {
        StringBuffer result = new StringBuffer();

        byte character = readNext();

        while (character == '\n' || character == '\r') {
            character = readNext();
        }

        while (character != '\n' && character != '\r') {
            result.append((char)character);
            character = readNext();
        }

        return result.toString();
    }

    private byte readNext() {
        if (currentIndex == lastIndex) {
            try {
                lastIndex = is.read(buffer, 0, bufferSize);
            } catch (IOException e) {
                throw new RuntimeException("What?");
            }
            if (lastIndex == -1) {
                buffer[0] = -1;
            }
            currentIndex = 0;
        }

        return buffer[currentIndex++];
    }
}


import java.io.*;
import java.util.Arrays;

public class C281_C {
    public static void main(String []args) {
        new Solution().solve();
    }
}

class Solution {
    FastReader fr = new FastReader();
    BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

    public void solve() {

        int n = fr.nextInt();
        long []a = new long[n];
        for (int i = 0; i < n; i++) {
            a[i] = fr.nextLong();
        }

        int m = fr.nextInt();
        long []b = new long[m];
        for (int i = 0; i < m; i++) {
            b[i] = fr.nextLong();
        }

        Arrays.sort(a);
        Arrays.sort(b);

        long aMax = 0;
        long bMax = 0;

        int i = 0, u = 0;

        while (i < n && u < m) {
            long next = Math.min(a[i], b[u]);
            if (i*2 +(n-i)*3 - (u*2 + (m-u)*3) > aMax*2 + (n-aMax)*3 - (bMax*2 + (m-bMax)*3)) {
                aMax = i;
                bMax = u;
            }

            int addA = 0, addB = 0;
            while (i + addA < n && a[i+addA] == next) addA++;
            while (u + addB < m && b[u+addB] == next) addB++;

            i += addA;
            u += addB;
        }

        if (i*2 +(n-i)*3 - (u*2 + (m-u)*3) > aMax*2 + (n-aMax)*3 - (bMax*2 + (m-bMax)*3)) {
            aMax = i;
            bMax = u;
        }
        if (n*2 - m*2 > aMax*2 + (n-aMax)*3 - (bMax*2 + (m-bMax)*3)) {
            aMax = n;
            bMax = m;
        }

        System.out.println((aMax * 2 + (n - aMax) * 3) + ":" + (bMax * 2 + (m - bMax) * 3));
    }
}

class FastReader {
    private InputStream is = new BufferedInputStream(System.in);
    private int bufferSize = 1 << 17;
    private byte []buffer = new byte[bufferSize];
    private int currentIndex = 0;
    private int lastIndex = 0;

    public int nextInt() {
        int result = 0;
        int minus = 1;

        byte character = readNext();

        while (character == ' ' || character == '\n' || character == '\r') {
            character = readNext();
        }

        if (character == '-') {
            minus = -1;
            character = readNext();
        }

        while (character != ' ' && character != '\n' && character != '\r') {
            result = result * 10 + (character - '0');
            character = readNext();
        }

        return minus*result;
    }

    public long nextLong() {
        long result = 0;
        int minus = 1;

        byte character = readNext();

        while (character == ' ' || character == '\n' || character == '\r') {
            character = readNext();
        }

        if (character == '-') {
            minus = -1;
            character = readNext();
        }

        while (character != ' ' && character != '\n' && character != '\r') {
            result = result * 10 + (character - '0');
            character = readNext();
        }

        return minus*result;
    }

    public String nextString() {
        StringBuffer result = new StringBuffer();

        byte character = readNext();

        while (character == ' ' || character == '\n' || character == '\r') {
            character = readNext();
        }

        while (character != ' ' && character != '\n' && character != '\r') {
            result.append((char)character);
            character = readNext();
        }

        return result.toString();
    }

    public String nextLine() {
        StringBuffer result = new StringBuffer();

        byte character = readNext();

        while (character == '\n' || character == '\r') {
            character = readNext();
        }

        while (character != '\n' && character != '\r') {
            result.append((char)character);
            character = readNext();
        }

        return result.toString();
    }

    private byte readNext() {
        if (currentIndex == lastIndex) {
            try {
                lastIndex = is.read(buffer, 0, bufferSize);
            } catch (IOException e) {
                throw new RuntimeException("What?");
            }
            if (lastIndex == -1) {
                buffer[0] = -1;
            }
            currentIndex = 0;
        }

        return buffer[currentIndex++];
    }
}


import java.util.*;
import java.io.*;
import java.lang.*;
import java.math.*;
public class C {
    public static void main(String[] args) throws Exception {
         BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
         int n = Integer.parseInt(bf.readLine());
         StringTokenizer st = new StringTokenizer(bf.readLine());
         int[] a = new int[n]; for(int i=0; i<n; i++) a[i] = Integer.parseInt(st.nextToken());

         int m = Integer.parseInt(bf.readLine());
         st = new StringTokenizer(bf.readLine());
         int[] b = new int[m]; for(int i=0; i<m; i++) b[i] = Integer.parseInt(st.nextToken());

         int i = -1; int j = -1;
         long asum = 0;
         long bsum = 0;
         for(int x : a) asum += 1; for(int x : b) bsum += 1;
         long tempasum = 0;
         long tempbsum = 0;
         long max = asum*3 - bsum*3;
         long ans1 = asum*3; long ans2 = bsum*3;
         while(i < a.length || j < b.length) {
             //System.out.println(tempasum + " " + tempbsum + " " + (2*tempasum + 3*(asum - tempasum)) + " " + (2*tempbsum + 3*(bsum - tempbsum)));
             if(2*tempasum + 3*(asum - tempasum) - 2*tempbsum - 3*(bsum - tempbsum) > max) {
                 max = 2*tempasum + 3*(asum - tempasum) - 2*tempbsum - 3*(bsum - tempbsum);
                 ans1 = 2*tempasum + 3*(asum - tempasum);
                 ans2 = 2*tempbsum + 3*(bsum - tempbsum);
             }
             if(i+1 >= a.length && j+1 >= b.length) break;
             else if(i+1 >= a.length) {
                 j++;
                 tempbsum += 1;
             }
             else if(b.length <= j+1) {
                 i++;
                 tempasum += 1;
             }
             else if(a[i+1] > b[j+1]) {
                 j++;
                 tempbsum += 1;
             }
             else {
                 i++;
                 tempasum += 1;
             }
         }
         System.out.println(ans1+":"+ans2);
        // Scanner scan = new Scanner(System.in);
        // PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
        // int n = Integer.parseInt(bf.readLine());
        // StringTokenizer st = new StringTokenizer(bf.readLine());

        // int n = Integer.parseInt(st.nextToken());
        // int n = scan.nextInt();

        // out.close(); System.exit(0);
    }
}


import java.util.*;
import java.io.*;
import java.lang.*;
import java.math.*;
public class C {
    public static void main(String[] args) throws Exception {
         BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
         int n = Integer.parseInt(bf.readLine());
         StringTokenizer st = new StringTokenizer(bf.readLine());
         int[] a = new int[n]; for(int i=0; i<n; i++) a[i] = Integer.parseInt(st.nextToken());

         int m = Integer.parseInt(bf.readLine());
         st = new StringTokenizer(bf.readLine());
         int[] b = new int[m]; for(int i=0; i<m; i++) b[i] = Integer.parseInt(st.nextToken());

         int i = -1; int j = -1;
         long asum = 0;
         long bsum = 0;
         for(int x : a) asum += 1; for(int x : b) bsum += 1;
         long tempasum = 0;
         long tempbsum = 0;
         long max = asum*3 - bsum*3;
         long ans1 = asum*3; long ans2 = bsum*3;
         if(a[0] == 1 || b[0] == 1) {
             max = -2000000000;

         }
         while(i < a.length || j < b.length) {
             //System.out.println(tempasum + " " + tempbsum + " " + (2*tempasum + 3*(asum - tempasum)) + " " + (2*tempbsum + 3*(bsum - tempbsum)));
             if((i >= 0 || j >= 0) && 2*tempasum + 3*(asum - tempasum) - 2*tempbsum - 3*(bsum - tempbsum) > max) {
                 max = 2*tempasum + 3*(asum - tempasum) - 2*tempbsum - 3*(bsum - tempbsum);
                 ans1 = 2*tempasum + 3*(asum - tempasum);
                 ans2 = 2*tempbsum + 3*(bsum - tempbsum);
             }
             if(i+1 >= a.length && j+1 >= b.length) break;
             else if(i+1 >= a.length) {
                 j++;
                 tempbsum += 1;
             }
             else if(b.length <= j+1) {
                 i++;
                 tempasum += 1;
             }
             else if(a[i+1] > b[j+1]) {
                 j++;
                 tempbsum += 1;
             }
             else {
                 i++;
                 tempasum += 1;
             }
         }
         System.out.println(ans1+":"+ans2);
        // Scanner scan = new Scanner(System.in);
        // PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
        // int n = Integer.parseInt(bf.readLine());
        // StringTokenizer st = new StringTokenizer(bf.readLine());

        // int n = Integer.parseInt(st.nextToken());
        // int n = scan.nextInt();

        // out.close(); System.exit(0);
    }
}


import java.util.*;
import java.io.*;
import java.lang.*;
import java.math.*;
public class C {
    public static void main(String[] args) throws Exception {
         BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
         int n = Integer.parseInt(bf.readLine());
         StringTokenizer st = new StringTokenizer(bf.readLine());
         int[] a = new int[n]; for(int i=0; i<n; i++) a[i] = Integer.parseInt(st.nextToken());

         int m = Integer.parseInt(bf.readLine());
         st = new StringTokenizer(bf.readLine());
         int[] b = new int[m]; for(int i=0; i<m; i++) b[i] = Integer.parseInt(st.nextToken());

         int i = 0; int j = 0;
         long asum = 0;
         long bsum = 0;
         for(int x : a) asum += 1; for(int x : b) bsum += 1;
         long tempasum = 0;
         long tempbsum = 0;
         long max = asum*3 - bsum*3;
         long ans1 = asum*3; long ans2 = bsum*3;
         while(i < a.length || j < b.length) {
             if(2*tempasum + 3*(asum - tempasum) - 2*tempbsum - 3*(bsum - tempbsum) > max) {
                 max = 2*tempasum + 3*(asum - tempasum) - 2*tempbsum - 3*(bsum - tempbsum);
                 ans1 = 2*tempasum + 3*(asum - tempasum);
                 ans2 = 2*tempbsum + 3*(bsum - tempbsum);
             }
             if(i+1 >= a.length && j+1 >= b.length) break;
             else if(i+1 >= a.length) {
                 j++;
                 tempbsum += 1;
             }
             else if(b.length <= j+1) {
                 i++;
                 tempasum += 1;
             }
             else if(a[i+1] > a[j+1]) {
                 j++;
                 tempbsum += 1;
             }
             else {
                 i++;
                 tempasum += 1;
             }
         }
         System.out.println(ans1+":"+ans2);
        // Scanner scan = new Scanner(System.in);
        // PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
        // int n = Integer.parseInt(bf.readLine());
        // StringTokenizer st = new StringTokenizer(bf.readLine());

        // int n = Integer.parseInt(st.nextToken());
        // int n = scan.nextInt();

        // out.close(); System.exit(0);
    }
}


import java.util.*;
import java.io.*;
import java.lang.*;
import java.math.*;
public class C {
    public static void main(String[] args) throws Exception {
         BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
         int n = Integer.parseInt(bf.readLine());
         StringTokenizer st = new StringTokenizer(bf.readLine());
         int[] a = new int[n]; for(int i=0; i<n; i++) a[i] = Integer.parseInt(st.nextToken());

         int m = Integer.parseInt(bf.readLine());
         st = new StringTokenizer(bf.readLine());
         int[] b = new int[m]; for(int i=0; i<m; i++) b[i] = Integer.parseInt(st.nextToken());

         int i = -1; int j = -1;
         long asum = 0;
         long bsum = 0;
         for(int x : a) asum += 1; for(int x : b) bsum += 1;
         long tempasum = 0;
         long tempbsum = 0;
         long max = asum*3 - bsum*3;
         long ans1 = asum*3; long ans2 = bsum*3;
         if(a[0] == 1 || b[0] == 1) {
             max = -2000000000;

         }
         while(i < a.length || j < b.length) {
             //System.out.println(tempasum + " " + tempbsum + " " + (2*tempasum + 3*(asum - tempasum)) + " " + (2*tempbsum + 3*(bsum - tempbsum)));
             if(2*tempasum + 3*(asum - tempasum) - 2*tempbsum - 3*(bsum - tempbsum) > max) {
                 max = 2*tempasum + 3*(asum - tempasum) - 2*tempbsum - 3*(bsum - tempbsum);
                 ans1 = 2*tempasum + 3*(asum - tempasum);
                 ans2 = 2*tempbsum + 3*(bsum - tempbsum);
             }
             if(i+1 >= a.length && j+1 >= b.length) break;
             else if(i+1 >= a.length) {
                 j++;
                 tempbsum += 1;
             }
             else if(b.length <= j+1) {
                 i++;
                 tempasum += 1;
             }
             else if(a[i+1] > b[j+1]) {
                 j++;
                 tempbsum += 1;
             }
             else {
                 i++;
                 tempasum += 1;
             }
         }
         System.out.println(ans1+":"+ans2);
        // Scanner scan = new Scanner(System.in);
        // PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
        // int n = Integer.parseInt(bf.readLine());
        // StringTokenizer st = new StringTokenizer(bf.readLine());

        // int n = Integer.parseInt(st.nextToken());
        // int n = scan.nextInt();

        // out.close(); System.exit(0);
    }
}


import java.util.*;
import java.io.*;
import java.lang.*;
import java.math.*;
public class C {
    public static void main(String[] args) throws Exception {
         BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
         int n = Integer.parseInt(bf.readLine());
         StringTokenizer st = new StringTokenizer(bf.readLine());
         int[] a = new int[n]; for(int i=0; i<n; i++) a[i] = Integer.parseInt(st.nextToken());

         int m = Integer.parseInt(bf.readLine());
         st = new StringTokenizer(bf.readLine());
         int[] b = new int[m]; for(int i=0; i<m; i++) b[i] = Integer.parseInt(st.nextToken());
         Arrays.sort(a); Arrays.sort(b);
         int i = -1; int j = -1;
         long asum = 0;
         long bsum = 0;
         for(int x : a) asum += 1; for(int x : b) bsum += 1;
         long tempasum = 0;
         long tempbsum = 0;
         long max = asum*3 - bsum*3;
         long ans1 = asum*3; long ans2 = bsum*3;
         while(i < a.length || j < b.length) {
             //System.out.println(tempasum + " " + tempbsum + " " + (2*tempasum + 3*(asum - tempasum)) + " " + (2*tempbsum + 3*(bsum - tempbsum)));
             if(2*tempasum + 3*(asum - tempasum) - 2*tempbsum - 3*(bsum - tempbsum) > max) {
                 max = 2*tempasum + 3*(asum - tempasum) - 2*tempbsum - 3*(bsum - tempbsum);
                 ans1 = 2*tempasum + 3*(asum - tempasum);
                 ans2 = 2*tempbsum + 3*(bsum - tempbsum);
             }
             if(i+1 >= a.length && j+1 >= b.length) break;
             else if(i+1 >= a.length) {
                 j++;
                 tempbsum += 1;
             }
             else if(b.length <= j+1) {
                 i++;
                 tempasum += 1;
             }
             else if(a[i+1] > b[j+1]) {
                 j++;
                 tempbsum += 1;
             }
             else {
                 i++;
                 tempasum += 1;
             }
         }
         System.out.println(ans1+":"+ans2);
        // Scanner scan = new Scanner(System.in);
        // PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
        // int n = Integer.parseInt(bf.readLine());
        // StringTokenizer st = new StringTokenizer(bf.readLine());

        // int n = Integer.parseInt(st.nextToken());
        // int n = scan.nextInt();

        // out.close(); System.exit(0);
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;

public class ProblemC {
    BufferedReader rd;

    private ProblemC() throws IOException {
        rd = new BufferedReader(new InputStreamReader(System.in));
        compute();
    }

    private void compute() throws IOException {
        pint();
        int[] a = intarr();
        pint();
        int[] b = intarr();

        NavigableSet<Integer> distSet = new TreeSet<>();
        for(int x: a) {
            distSet.add(x);
        }
        for(int x: b) {
            distSet.add(x);
        }
        Map<Integer, Integer> idx = new HashMap<>();
        int ni = 1;
        for(Integer d: distSet) {
            idx.put(d, ni);
            ni++;
        }
        int last = ni-1;

        SortedMap<Integer, Integer> aMap = sort(a);
        SortedMap<Integer, Integer> bMap = sort(b);

        long[] sa = new long[400010];
        long[] sb = new long[400010];
        int ix = 1;
        for(Integer d: distSet) {
            int incr = 0;
            Integer cnt = aMap.get(d);
            if(cnt != null) {
                incr = cnt;
            }
            sa[ix] = sa[ix-1] + incr;

            incr = 0;
            cnt = bMap.get(d);
            if(cnt != null) {
                incr = cnt;
            }
            sb[ix] = sb[ix-1] + incr;

            ix++;
        }

        long[] pts = new long[] { 3 * sa[last], 3 * sb[last] };
        long maxDiff = pts[0] - pts[1];
        for(int i=1;i<=last;i++) {
            long pa = 2*sa[i] + 3*(sa[last] - sa[i]);
            long pb = 2*sb[i] + 3*(sb[last] - sb[i]);
            long diff = pa - pb;
            if(diff > maxDiff || (diff == maxDiff && pts[0] < pa)) {
                maxDiff = diff;
                pts[0] = pa;
                pts[1] = pb;
            }
        }
        out(pts[0]+":"+pts[1]);
    }

    private SortedMap<Integer, Integer> sort(int[] a) {
        SortedMap<Integer, Integer> as = new TreeMap<>();
        for(int x: a) {
            Integer cnt = as.get(x);
            if(cnt == null) {
                cnt = 1;
            } else {
                cnt++;
            }
            as.put(x, cnt);
        }
        return as;
    }

    private int pint() throws IOException {
        return pint(rd.readLine());
    }

    private int pint(String s) {
        return Integer.parseInt(s);
    }

    private int[] intarr() throws IOException {
        return intarr(rd.readLine());
    }

    private int[] intarr(String s) {
        String[] q = split(s);
        int n = q.length;
        int[] a = new int[n];
        for(int i=0;i<n;i++) {
            a[i] = Integer.parseInt(q[i]);
        }
        return a;
    }

    private String[] split(String s) {
        int n = s.length();
        int sp = 0;
        for(int i=0;i<n;i++) {
            if(s.charAt(i)==' ') {
                sp++;
            }
        }
        String[] res = new String[sp+1];
        int last = 0;
        int x = 0;
        for(int i=0;i<n;i++) {
            char c = s.charAt(i);
            if(c == ' ') {
                res[x++] = s.substring(last,i);
                last = i+1;
            }
        }
        res[x] = s.substring(last,n);
        return res;
    }

    private static void out(Object x) {
        System.out.println(x);
    }

    public static void main(String[] args) throws IOException {
        new ProblemC();
    }
}


import java.util.*;
import java.io.*;

public class Main{

    BufferedReader in;
    StringTokenizer str = null;
    PrintWriter out;

    private String next() throws Exception{
    	while (str == null || !str.hasMoreElements())
    	    str = new StringTokenizer(in.readLine());
    	return str.nextToken();
    }

    private int nextInt() throws Exception{
	   return Integer.parseInt(next());
    }

    public void run() throws Exception{
    	in = new BufferedReader(new InputStreamReader(System.in));
    	out = new PrintWriter(System.out);

        int n = nextInt();
        int []a = new int[n];
        for(int i = 0; i < n; ++i) a[i] = nextInt();
        int m = nextInt();
        int []b = new int[m];
        for(int i = 0; i < m; ++i) b[i] = nextInt();

        List<Integer> l = new ArrayList<Integer>();
        for(int i = 0; i < n; ++i) l.add(a[i]);
        for(int i = 0; i < m; ++i) l.add(b[i]);
        Collections.sort(l);

        int at = 0;
        for(int i = 1; i < l.size(); ++i) {
            if (l.get(at).compareTo(l.get(i)) != 0) {
                l.set(++at, l.get(i));
            }
        }
        for(int i = l.size() - 1; i > at; --i) l.remove(i);

        int []c = new int[l.size() + 2];
        at = 0;
        c[at++] = 0;
        for(int i : l) c[at++] = i;
        c[at++] = Integer.MAX_VALUE;

        Arrays.sort(a);
        Arrays.sort(b);
        int diff = Integer.MIN_VALUE, A = -1, B = -1;

        for(int i = 0; i < c.length; ++i) {
            int limit = c[i];
            int score1 = get(a, limit),score2 = get(b, limit);
            if (diff < score1 - score2 || (diff == score1 - score2 && A < score1)) {
                diff = score1 - score2;
                A = score1;
                B = score2;
            }
        }

        out.println(A + ":" + B);
        out.close();
    }

    private int get(int []a, int limit) {
        int n = a.length;
        int lo = -1, hi = n;
        while(hi - lo > 1) {
            int mid = lo + (hi - lo) / 2;
            if (a[mid] < limit) {
                lo = mid;
            }else {
                hi = mid;
            }
        }

        return 3 * n - hi;
    }

    public static void main(String args[]) throws Exception{
	   new Main().run();
    }
}


import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.InputMismatchException;
import java.util.StringTokenizer;

public class Main {

	public static void main(String[] args) {
		Task mSol = new Task();
		mSol.solve();
		mSol.flush();
		mSol.close();
	}

}

class Task {

	public FasterScanner mFScanner;
	public PrintWriter mOut;

	public Task() {
		mFScanner = new FasterScanner();
		mOut = new PrintWriter(System.out);
	}

	public void solve() {

		int i;
		int firstN, secondN;
		long firstD[];
		long secondD[];
		long firstP;
		long secondP;
		long maxDiff = -1;
		long maxA;
		long B;

		firstN = mFScanner.nextInt();
		firstD = new long[firstN];

		for (i = 0; i < firstN; i++)
			firstD[i] = mFScanner.nextLong();

		secondN = mFScanner.nextInt();
		secondD = new long[secondN];
		for (i = 0; i < secondN; i++)
			secondD[i] = mFScanner.nextLong();

		Arrays.sort(firstD);
		Arrays.sort(secondD);

		int index;
		long val;
		int j;

		firstP = 3 * firstN;
		secondP = 3 * secondN;

		maxDiff = firstP - secondP;
		maxA = firstP;
		B = secondP;

		for (i = 0; i < firstN + 2; i++) {

			if (i == firstN) {
				val = firstD[0] - 1;
			} else if (i == firstN + 1) {
				val = firstD[firstN - 1] + 1;
			} else {
				val = firstD[i];
			}
			index = binarySearch(secondD, val);
			j = binarySearch(firstD, val);

			firstP = 3 * (firstN - j) + 2 * j;
			secondP = 3 * (secondN - index) + 2 * index;

			long diff = firstP - secondP;

			if (diff > maxDiff) {
				maxDiff = diff;
				maxA = firstP;
				B = secondP;
			} else if (diff == maxDiff && firstP > maxA) {
				maxA = firstP;
				B = secondP;
			}
		}

		firstP = 2 * firstN;
		secondP = 2 * secondN;

		long diff = firstP - secondP;

		if (diff > maxDiff) {
			maxDiff = diff;
			maxA = firstP;
			B = secondP;
		} else if (diff == maxDiff && firstP > maxA) {
			maxA = firstP;
			B = secondP;
		}

		mOut.println(maxA + ":" + B);

	}

	public int binarySearch(long arr[], long val) {

		int begin, end;
		int mid;

		begin = 0;
		end = arr.length;
		mid = 0;

		while (begin < end) {

			mid = (begin + end) / 2;

			if (val >= arr[mid])
				begin = mid + 1;
			else if (val < arr[mid])
				end = mid - 1;
		}

		return begin;

	}

	public void flush() {
		mOut.flush();
	}

	public void close() {
		mOut.close();
	}
}

class FasterScanner {
	private InputStream mIs;
	private byte[] buf = new byte[1024];
	private int curChar;
	private int numChars;

	public FasterScanner() {
		this(System.in);
	}

	public FasterScanner(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 nextString() {
		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 nextLong() {
		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 nextInt() {
		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 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;
	}

}