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

public class Program {

    BufferedReader br;
    PrintWriter out;
    StringTokenizer st;
    boolean eof;

    static final int MOD = 1000000007;
    static final double INF = 10000000000.0;

	int n, m;
	int[] a, b;

	int bins(int[] arr, int x)
	{
		int l, r, mid;
		l = 0;
		r = arr.length-1;
		while(r-l > 1)
		{
			mid = l + (r-l)/2;
			if (arr[mid] < x)
				l = mid + 1;
			else
				r = mid;
		}
		if (arr[l] >= x)
			return l;
		else if (arr[r] >= x)
			return r;
		else
			return arr.length;
	}

    void solve() throws IOException {
    	n = nextInt();
    	a = new int[n];
    	for(int i = 0; i < n; i++)
    		a[i] = nextInt();
    	m = nextInt();
    	b = new int[m];
    	for(int i = 0; i < m; i++)
    		b[i] = nextInt();
    	Arrays.sort(a);
    	Arrays.sort(b);
    	int ans = Integer.MIN_VALUE, xmin = Integer.MIN_VALUE, ax, bx;
    	ax = bx = -1;
    	for(int i = 0; i < n; i++)
    	{
    		int x, y, r;
    		x = (n-i)*3 + i*2;
    		r = bins(b, a[i]);
    		y = (m-r)*3 + r*2;
    		if (ans < x-y || (ans == x-y && xmin < x))
    		{
    			ans = x-y;
    			ax = x;
    			bx = y;
    			xmin = x;
    		}
    	}
    	int x, y, r;
    	x = n * 2;
    	r = bins(b, a[n-1]+1);
    	y = (m-r)*3 + r*2;
		if (ans < x-y || (ans == x-y && xmin < x))
		{
			ans = x-y;
			ax = x;
			bx = y;
			xmin = x;
		}
		y = m * 2;
		r = bins(a, b[m-1]);
		x = (n-r)*3 + r*2;
		if (ans < x-y || (ans == x-y && xmin < x))
		{
			ans = x-y;
			ax = x;
			bx = y;
			xmin = x;
		}
		out.println(ax + ":" + bx);
    }

    Program() throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        solve();
        out.close();
    }

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

    String nextToken() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                eof = true;
                return null;
            }
        }
        return st.nextToken();
    }

    String nextString() {
        try {
            return br.readLine();
        } catch (IOException e) {
            eof = true;
            return null;
        }
    }

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

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

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


import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Scanner;

public class T493C {
	static class Cmp implements Comparator<int[]>{
		@Override
		public int compare(int[] a, int[] b) {
			return a[0]<b[0]?-1:(a[0]>b[0]?1:0);
		}

	}
	public static void main(String[] args) {
		Scanner in=new Scanner(System.in);
		PrintWriter out=new PrintWriter(System.out);
		int n,m,i,x;
		n=in.nextInt();
		int[] a=new int[2*100000+1];
		for(i=0;i<n;i++){
			x=in.nextInt();
			a[x]=10;
		}
		m=in.nextInt();
		for(i=0;i<m;i++){
			x=in.nextInt();
			if(a[x]==10)
				a[x]=11;
			else
				a[x]=01;
		}

		ArrayList<int[]> b=new ArrayList<int[]>();
		for(i=0;i<2*100000+1;i++){
			if(a[i]>0){
				b.add(new int[]{i,a[i]});
			}
		}
		Collections.sort(b, new Cmp());

		String res=n*3+":"+m*3;
		long max=(n-m)*3;
		long suma=n*3,sumb=m*3;
		for(i=0;i<b.size();i++){
			if(b.get(i)[1]==10){
				suma--;
			}else if(b.get(i)[1]==11){
				suma--;
				sumb--;
			}else if(b.get(i)[1]==01){
				sumb--;
			}
			if(max<suma-sumb){
				max=suma-sumb;
				res=suma+":"+sumb;
			}
		}

		out.println(res);
		in.close();
		out.flush();
	}

}


import java.io.PrintWriter;
import java.util.Scanner;
import java.util.TreeMap;

public class T493C {
	public static void main(String[] args) {
		Scanner in=new Scanner(System.in);
		PrintWriter out=new PrintWriter(System.out);
		int n,m,i,x;
		n=in.nextInt();
		TreeMap<Integer, int[]> a=new TreeMap<Integer, int[]>();
		for(i=0;i<n;i++){
			x=in.nextInt();
			a.put(x, a.containsKey(x)?new int[]{a.get(x)[0]+1,a.get(x)[1]}:new int[]{1,0});
		}
		m=in.nextInt();
		for(i=0;i<m;i++){
			x=in.nextInt();
			a.put(x, a.containsKey(x)?new int[]{a.get(x)[0],a.get(x)[1]+1}:new int[]{0,1});
		}

		String res=n*3+":"+m*3;
		long max=(n-m)*3;
		long suma=n*3,sumb=m*3;
		for(int key:a.keySet()){
			suma-=a.get(key)[0];
			sumb-=a.get(key)[1];
			if(max<suma-sumb){
				max=suma-sumb;
				res=suma+":"+sumb;
			}
		}

		out.println(res);
		in.close();
		out.flush();
	}

}


import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Scanner;

public class T493C {
	static class Cmp implements Comparator<int[]>{
		@Override
		public int compare(int[] a, int[] b) {
			return a[0]<b[0]?-1:(a[0]>b[0]?1:0);
		}

	}
	public static void main(String[] args) {
		Scanner in=new Scanner(System.in);
		PrintWriter out=new PrintWriter(System.out);
		int n,m,i,x;
		n=in.nextInt();
		int[] a=new int[2*100000+1];
		for(i=0;i<n;i++){
			x=in.nextInt();
			a[x]++;
		}
		m=in.nextInt();
		int[] b=new int[2*100000+1];
		for(i=0;i<m;i++){
			x=in.nextInt();
			b[x]++;
		}

		ArrayList<int[]> c=new ArrayList<int[]>();
		for(i=0;i<2*100000+1;i++){
			if(a[i]>0&&b[i]>0){
				c.add(new int[]{i,a[i],b[i]});
			}else if(a[i]>0&&b[i]==0){
				c.add(new int[]{i,a[i],0});
			}else if(a[i]==0&&b[i]>0){
				c.add(new int[]{i,0,b[i]});
			}
		}
		Collections.sort(c, new Cmp());

		String res=n*3+":"+m*3;
		long max=(n-m)*3;
		long suma=n*3,sumb=m*3;
		for(i=0;i<c.size();i++){
			suma-=c.get(i)[1];
			sumb-=c.get(i)[2];
			if(max<suma-sumb){
				max=suma-sumb;
				res=suma+":"+sumb;
			}
		}

		out.println(res);
		in.close();
		out.flush();
	}

}


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.util.TreeMap;

public class T493C {
	public static void main(String[] args) {
		FastScanner in=new FastScanner();
		PrintWriter out=new PrintWriter(System.out);
		int n,m,i,x;
		n=in.nextInt();
		TreeMap<Integer, int[]> a=new TreeMap<Integer, int[]>();
		for(i=0;i<n;i++){
			x=in.nextInt();
			a.put(x, a.containsKey(x)?new int[]{a.get(x)[0]+1,a.get(x)[1]}:new int[]{1,0});
		}
		m=in.nextInt();
		for(i=0;i<m;i++){
			x=in.nextInt();
			a.put(x, a.containsKey(x)?new int[]{a.get(x)[0],a.get(x)[1]+1}:new int[]{0,1});
		}

		String res=n*3+":"+m*3;
		long max=(n-m)*3;
		long suma=n*3,sumb=m*3;
		for(int key:a.keySet()){
			suma-=a.get(key)[0];
			sumb-=a.get(key)[1];
			if(max<suma-sumb){
				max=suma-sumb;
				res=suma+":"+sumb;
			}
		}

		out.println(res);
		out.flush();
	}
	static class FastScanner{
		BufferedReader br;
		StringTokenizer st;
		public FastScanner(){br = new BufferedReader(new InputStreamReader(System.in));}
		String nextToken(){
			while(st == null||!st.hasMoreElements()){
				try{st = new StringTokenizer(br.readLine());}catch(Exception e){}
			}
			return st.nextToken();
		}
		int nextInt(){return Integer.parseInt(nextToken());}
		long nextLong(){return Long.parseLong(nextToken());}
		double nextDouble(){return Double.parseDouble(nextToken());}
	}
}


import java.util.*;
import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;

public class Main {

  public static void main(String[] args) throws Exception {

      new Main().solve();
  }

  int m;
  int k;

  int b;
  int n;

  String s;
  String ns = "";
  boolean[] use;
  long c = 0;
  int[] ch;
  int[][]  w;
  int cnt;
  int inf = 2000000000;
  int[] t;
  int[] dp;
  int[][] a;
  void solve() throws Exception {
      Reader in = new Reader("1.in");
      PrintWriter out = new PrintWriter( new BufferedWriter( new OutputStreamWriter(System.out) ) );
     //PrintWriter out = new PrintWriter( new BufferedWriter( new FileWriter("1.txt") ) );

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

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

     long maxa = 0;
     long maxb = 0;
     int d = 0;
     long r = 0;
     int pos = m;

     for (int i = 0; i <= n; i++) {
    	 d = a[i];
    	 long new_a = i*3+(n-i)*2;
    	 //pos = m;
    	 while (pos > 0 && b[pos] < d)
    		 pos--;

    	 long new_b = (pos)*3+(m-(pos))*2;

    	 if ( (new_a - new_b) >= (maxa - maxb) ) {
    		 maxa = new_a;
    		 maxb = new_b;
    	 }

     }

     out.print(maxa+":"+maxb);
     out.flush();
     out.close();

  }

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

  long pow(int x, int m) {
	  if (m == 0)
		  return 1;
	  return x*pow(x, m-1);
  }

  class Reader {

      BufferedReader br;
      StringTokenizer token = null;

      Reader(String file) throws Exception {
          br = new BufferedReader( new InputStreamReader(System.in) );
          //br = new BufferedReader( new FileReader(file) );
      }

      String next() throws Exception {
          while (token == null || !token.hasMoreElements()) {
        	  try {
        		  token = new StringTokenizer(br.readLine());
        	  }
        	  catch (Exception e) {
        		  return null;
        	  }
          }
          return token.nextToken();
      }

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

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

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

      char nextChar() throws Exception {
          return next().charAt(0);
      }

      String nextString() throws IOException {
    	  return br.readLine();
      }

  }
}


import java.util.*;
import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;

public class Main {

  public static void main(String[] args) throws Exception {

      new Main().solve();
  }

  int m;
  int k;

  int b;
  int n;

  String s;
  String ns = "";
  boolean[] use;
  long c = 0;
  int[] ch;
  int[][]  w;
  int cnt;
  int inf = 2000000000;
  int[] t;
  int[] dp;
  int[][] a;
  void solve() throws Exception {
      Reader in = new Reader("1.in");
      PrintWriter out = new PrintWriter( new BufferedWriter( new OutputStreamWriter(System.out) ) );
     //PrintWriter out = new PrintWriter( new BufferedWriter( new FileWriter("1.txt") ) );

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

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

     long maxa = 0;
     long maxb = 1000000000;
     int d = 0;
     long r = 0;
     int pos = 1;

     ArrayList<Integer> list = new ArrayList<Integer>();

     for (int i = 1; i <= n; i++) {
    	 list.add(a[i]);
    	 list.add(a[i]-1);
     }

     for (int i = 1; i <= m; i++) {
    	 list.add(b[i]);
    	 list.add(b[i]-1);
     }

     for (int i = 0; i < list.size(); i++) {
    	 d = list.get(i);

    	 int ll = 0;
    	 int rr = n+1;

    	 while (rr > ll) {
    		 pos = ll + (rr-ll)/2;
    		 if (a[pos] > d)
    			 rr = pos;
    		 else
    			 ll = pos + 1;
    		 //System.out.println(pos);
    	 }

    	 long new_a = (n-pos)*3+(pos)*2;
    	 //pos = m;

    	 ll = 0;
    	 rr = m+1;

    	 while (rr > ll) {
    		 pos = ll + (rr-ll)/2;
    		 if (b[pos] > d)
    			 rr = pos;
    		 else
    			 ll = pos + 1;
    		 //System.out.println(pos);
    	 }

    	 long new_b = (m-pos)*3+(pos)*2;

    	 if ( (new_a - new_b) >= (maxa - maxb) ) {
    		 maxa = new_a;
    		 maxb = new_b;
    	 }

     }

     out.print(maxa+":"+maxb);
     out.flush();
     out.close();

  }

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

  long pow(int x, int m) {
	  if (m == 0)
		  return 1;
	  return x*pow(x, m-1);
  }

  class Reader {

      BufferedReader br;
      StringTokenizer token = null;

      Reader(String file) throws Exception {
          br = new BufferedReader( new InputStreamReader(System.in) );
          //br = new BufferedReader( new FileReader(file) );
      }

      String next() throws Exception {
          while (token == null || !token.hasMoreElements()) {
        	  try {
        		  token = new StringTokenizer(br.readLine());
        	  }
        	  catch (Exception e) {
        		  return null;
        	  }
          }
          return token.nextToken();
      }

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

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

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

      char nextChar() throws Exception {
          return next().charAt(0);
      }

      String nextString() throws IOException {
    	  return br.readLine();
      }

  }
}


import java.util.*;
import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;

public class Main {

  public static void main(String[] args) throws Exception {

      new Main().solve();
  }

  int m;
  int k;

  int b;
  int n;

  String s;
  String ns = "";
  boolean[] use;
  long c = 0;
  int[] ch;
  int[][]  w;
  int cnt;
  int inf = 2000000000;
  int[] t;
  int[] dp;
  int[][] a;
  void solve() throws Exception {
      Reader in = new Reader("1.in");
      PrintWriter out = new PrintWriter( new BufferedWriter( new OutputStreamWriter(System.out) ) );
     //PrintWriter out = new PrintWriter( new BufferedWriter( new FileWriter("1.txt") ) );

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

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

     long maxa = 0;
     long maxb = 1000000000;
     int d = 0;
     long r = 0;
     int pos = 1;

     for (int i = 0; i <= n; i++) {
    	 d = a[i]-1;

    	 int ll = 0;
    	 int rr = n+1;

    	 while (rr > ll) {
    		 pos = ll + (rr-ll)/2;
    		 if (a[pos] > d)
    			 rr = pos;
    		 else
    			 ll = pos + 1;
    		 //System.out.println(pos);
    	 }

    	 long new_a = (n-pos)*3+(pos)*2;
    	 //pos = m;

    	 ll = 0;
    	 rr = m+1;

    	 while (rr > ll) {
    		 pos = ll + (rr-ll)/2;
    		 if (b[pos] > d)
    			 rr = pos;
    		 else
    			 ll = pos + 1;
    		 //System.out.println(pos);
    	 }

    	 long new_b = (m-pos)*3+(pos)*2;

    	 if ( (new_a - new_b) >= (maxa - maxb) ) {
    		 maxa = new_a;
    		 maxb = new_b;
    	 }

     }

     out.print(maxa+":"+maxb);
     out.flush();
     out.close();

  }

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

  long pow(int x, int m) {
	  if (m == 0)
		  return 1;
	  return x*pow(x, m-1);
  }

  class Reader {

      BufferedReader br;
      StringTokenizer token = null;

      Reader(String file) throws Exception {
          br = new BufferedReader( new InputStreamReader(System.in) );
          //br = new BufferedReader( new FileReader(file) );
      }

      String next() throws Exception {
          while (token == null || !token.hasMoreElements()) {
        	  try {
        		  token = new StringTokenizer(br.readLine());
        	  }
        	  catch (Exception e) {
        		  return null;
        	  }
          }
          return token.nextToken();
      }

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

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

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

      char nextChar() throws Exception {
          return next().charAt(0);
      }

      String nextString() throws IOException {
    	  return br.readLine();
      }

  }
}


import java.util.*;
import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;

public class Main {

  public static void main(String[] args) throws Exception {

      new Main().solve();
  }

  int m;
  int k;

  int b;
  int n;

  String s;
  String ns = "";
  boolean[] use;
  long c = 0;
  int[] ch;
  int[][]  w;
  int cnt;
  int inf = 2000000000;
  int[] t;
  int[] dp;
  int[][] a;
  void solve() throws Exception {
      Reader in = new Reader("1.in");
      PrintWriter out = new PrintWriter( new BufferedWriter( new OutputStreamWriter(System.out) ) );
     //PrintWriter out = new PrintWriter( new BufferedWriter( new FileWriter("1.txt") ) );

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

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

     long maxa = 0;
     long maxb = 0;
     int d = 0;
     long r = 0;
     int pos = 1;

     for (int i = 0; i <= n; i++) {
    	 d = a[i];
    	 long new_a = i*3+(n-i)*2;
    	 //pos = m;

    	 int ll = 0;
    	 int rr = m;

    	 while (rr > ll) {
    		 pos = ll + (rr-ll)/2;
    		 if (b[pos] >= d)
    			 rr = pos;
    		 else
    			 ll = pos + 1;
    		 //System.out.println(pos);
    	 }

    	 long new_b = (m-pos)*3+(pos)*2;

    	 if ( (new_a - new_b) >= (maxa - maxb) ) {
    		 maxa = new_a;
    		 maxb = new_b;
    	 }

     }

     out.print(maxa+":"+maxb);
     out.flush();
     out.close();

  }

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

  long pow(int x, int m) {
	  if (m == 0)
		  return 1;
	  return x*pow(x, m-1);
  }

  class Reader {

      BufferedReader br;
      StringTokenizer token = null;

      Reader(String file) throws Exception {
          br = new BufferedReader( new InputStreamReader(System.in) );
          //br = new BufferedReader( new FileReader(file) );
      }

      String next() throws Exception {
          while (token == null || !token.hasMoreElements()) {
        	  try {
        		  token = new StringTokenizer(br.readLine());
        	  }
        	  catch (Exception e) {
        		  return null;
        	  }
          }
          return token.nextToken();
      }

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

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

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

      char nextChar() throws Exception {
          return next().charAt(0);
      }

      String nextString() throws IOException {
    	  return br.readLine();
      }

  }
}


import java.util.*;
import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;

public class Main {

  public static void main(String[] args) throws Exception {

      new Main().solve();
  }

  int m;
  int k;

  int b;
  int n;

  String s;
  String ns = "";
  boolean[] use;
  long c = 0;
  int[] ch;
  int[][]  w;
  int cnt;
  int inf = 2000000000;
  int[] t;
  int[] dp;
  int[][] a;
  void solve() throws Exception {
      Reader in = new Reader("1.in");
      PrintWriter out = new PrintWriter( new BufferedWriter( new OutputStreamWriter(System.out) ) );
     //PrintWriter out = new PrintWriter( new BufferedWriter( new FileWriter("1.txt") ) );

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

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

     long maxa = 0;
     long maxb = 0;
     int d = 0;
     long r = 0;
     int pos = 1;

     for (int i = 0; i <= n; i++) {
    	 d = a[i];
    	 long new_a = i*3+(n-i)*2;
    	 //pos = m;

    	 int ll = 0;
    	 int rr = m;

    	 while (rr > ll) {
    		 pos = ll + rr/2;
    		 if (b[pos] >= d)
    			 rr = pos;
    		 else
    			 ll = pos + 1;
    		 //System.out.println(pos);
    	 }

    	 long new_b = (m-pos)*3+(pos)*2;

    	 if ( (new_a - new_b) >= (maxa - maxb) ) {
    		 maxa = new_a;
    		 maxb = new_b;
    	 }

     }

     out.print(maxa+":"+maxb);
     out.flush();
     out.close();

  }

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

  long pow(int x, int m) {
	  if (m == 0)
		  return 1;
	  return x*pow(x, m-1);
  }

  class Reader {

      BufferedReader br;
      StringTokenizer token = null;

      Reader(String file) throws Exception {
          br = new BufferedReader( new InputStreamReader(System.in) );
          //br = new BufferedReader( new FileReader(file) );
      }

      String next() throws Exception {
          while (token == null || !token.hasMoreElements()) {
        	  try {
        		  token = new StringTokenizer(br.readLine());
        	  }
        	  catch (Exception e) {
        		  return null;
        	  }
          }
          return token.nextToken();
      }

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

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

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

      char nextChar() throws Exception {
          return next().charAt(0);
      }

      String nextString() throws IOException {
    	  return br.readLine();
      }

  }
}


import java.util.*;
import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;

public class Main {

  public static void main(String[] args) throws Exception {

      new Main().solve();
  }

  int m;
  int k;

  int b;
  int n;

  String s;
  String ns = "";
  boolean[] use;
  long c = 0;
  int[] ch;
  int[][]  w;
  int cnt;
  int inf = 2000000000;
  int[] t;
  int[] dp;
  int[][] a;
  void solve() throws Exception {
      Reader in = new Reader("1.in");
      PrintWriter out = new PrintWriter( new BufferedWriter( new OutputStreamWriter(System.out) ) );
     //PrintWriter out = new PrintWriter( new BufferedWriter( new FileWriter("1.txt") ) );

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

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

     long maxa = 0;
     long maxb = 0;
     int d = 0;
     long r = 0;
     int pos = 1;

     for (int i = 0; i <= n; i++) {
    	 d = a[i];
    	 long new_a = i*3+(n-i)*2;
    	 //pos = m;

    	 int ll = 0;
    	 int rr = m+1;

    	 while (rr > ll) {
    		 pos = ll + (rr-ll)/2;
    		 if (b[pos] >= d)
    			 rr = pos;
    		 else
    			 ll = pos + 1;
    		 //System.out.println(pos);
    	 }

    	 long new_b = (m-pos)*3+(pos)*2;

    	 if ( (new_a - new_b) >= (maxa - maxb) ) {
    		 maxa = new_a;
    		 maxb = new_b;
    	 }

     }

     out.print(maxa+":"+maxb);
     out.flush();
     out.close();

  }

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

  long pow(int x, int m) {
	  if (m == 0)
		  return 1;
	  return x*pow(x, m-1);
  }

  class Reader {

      BufferedReader br;
      StringTokenizer token = null;

      Reader(String file) throws Exception {
          br = new BufferedReader( new InputStreamReader(System.in) );
          //br = new BufferedReader( new FileReader(file) );
      }

      String next() throws Exception {
          while (token == null || !token.hasMoreElements()) {
        	  try {
        		  token = new StringTokenizer(br.readLine());
        	  }
        	  catch (Exception e) {
        		  return null;
        	  }
          }
          return token.nextToken();
      }

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

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

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

      char nextChar() throws Exception {
          return next().charAt(0);
      }

      String nextString() throws IOException {
    	  return br.readLine();
      }

  }
}


import java.util.*;
import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;

public class Main {

  public static void main(String[] args) throws Exception {

      new Main().solve();
  }

  int m;
  int k;

  int b;
  int n;

  String s;
  String ns = "";
  boolean[] use;
  long c = 0;
  int[] ch;
  int[][]  w;
  int cnt;
  int inf = 2000000000;
  int[] t;
  int[] dp;
  int[][] a;
  void solve() throws Exception {
      Reader in = new Reader("1.in");
      PrintWriter out = new PrintWriter( new BufferedWriter( new OutputStreamWriter(System.out) ) );
     //PrintWriter out = new PrintWriter( new BufferedWriter( new FileWriter("1.txt") ) );

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

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

     long maxa = 0;
     long maxb = 1000000000;
     int d = 0;
     long r = 0;
     int pos = 1;

     ArrayList<Integer> list = new ArrayList<Integer>();

     for (int i = 1; i <= n; i++) {
    	 list.add(a[i]);
    	 list.add(a[i]-1);
     }

     for (int i = 1; i <= m; i++) {
    	 list.add(b[i]);
    	 list.add(b[i]-1);
     }

     for (int i = 0; i < list.size(); i++) {
    	 d = list.get(i);

    	 int ll = 0;
    	 int rr = n+1;

    	 while (rr > ll) {
    		 pos = ll + (rr-ll)/2;
    		 if (a[pos] > d)
    			 rr = pos;
    		 else
    			 ll = pos + 1;
    		 //System.out.println(pos);
    	 }

    	 long new_a = (n-pos)*3+(pos)*2;
    	 //pos = m;

    	 ll = 0;
    	 rr = m+1;

    	 while (rr > ll) {
    		 pos = ll + (rr-ll)/2;
    		 if (b[pos] > d)
    			 rr = pos;
    		 else
    			 ll = pos + 1;
    		 //System.out.println(pos);
    	 }

    	 long new_b = (m-pos)*3+(pos)*2;

    	 if ( (new_a - new_b) > (maxa - maxb)) {
    		 maxa = new_a;
    		 maxb = new_b;
    	 }
    	 else
    	 if ( (new_a - new_b) == (maxa - maxb) && new_a > maxa) {
    		 maxa = new_a;
    		 maxb = new_b;
    	 }

     }

     out.print(maxa+":"+maxb);
     out.flush();
     out.close();

  }

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

  long pow(int x, int m) {
	  if (m == 0)
		  return 1;
	  return x*pow(x, m-1);
  }

  class Reader {

      BufferedReader br;
      StringTokenizer token = null;

      Reader(String file) throws Exception {
          br = new BufferedReader( new InputStreamReader(System.in) );
          //br = new BufferedReader( new FileReader(file) );
      }

      String next() throws Exception {
          while (token == null || !token.hasMoreElements()) {
        	  try {
        		  token = new StringTokenizer(br.readLine());
        	  }
        	  catch (Exception e) {
        		  return null;
        	  }
          }
          return token.nextToken();
      }

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

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

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

      char nextChar() throws Exception {
          return next().charAt(0);
      }

      String nextString() throws IOException {
    	  return br.readLine();
      }

  }
}


import java.util.*;
import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;

public class Main {

  public static void main(String[] args) throws Exception {

      new Main().solve();
  }

  int m;
  int k;

  int b;
  int n;

  String s;
  String ns = "";
  boolean[] use;
  long c = 0;
  int[] ch;
  int[][]  w;
  int cnt;
  int inf = 2000000000;
  int[] t;
  int[] dp;
  int[][] a;
  void solve() throws Exception {
      Reader in = new Reader("1.in");
      PrintWriter out = new PrintWriter( new BufferedWriter( new OutputStreamWriter(System.out) ) );
     //PrintWriter out = new PrintWriter( new BufferedWriter( new FileWriter("1.txt") ) );

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

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

     long maxa = 0;
     long maxb = 1000000000;
     int d = 0;
     long r = 0;
     int pos = 1;

     ArrayList<Integer> list = new ArrayList<Integer>();

     for (int i = 1; i <= n; i++) {
    	 list.add(a[i]);
    	 list.add(a[i]-1);
     }

     for (int i = 1; i <= m; i++) {
    	 list.add(b[i]);
    	 list.add(b[i]-1);
     }

     for (int i = 0; i < list.size(); i++) {
    	 d = list.get(i);

    	 int ll = 0;
    	 int rr = n+1;

    	 while (rr - ll > 1) {
    		 pos = ll + (rr-ll)/2;
    		 if (a[pos] > d)
    			 rr = pos;
    		 else
    			 ll = pos;

    	 }
    	 if (a[pos] > d)
    		 pos--;
    	 //System.out.println(pos);
    	 long new_a = (n-pos)*3+(pos)*2;
    	 //pos = m;

    	 ll = 0;
    	 rr = m+1;

    	 while (rr > ll) {
    		 pos = ll + (rr-ll)/2;
    		 if (b[pos] > d)
    			 rr = pos;
    		 else
    			 ll = pos + 1;
    		 //System.out.println(pos);
    	 }
    	 if (b[pos] > d)
    		 pos--;
    	 long new_b = (m-pos)*3+(pos)*2;

    	 if ( (new_a - new_b) > (maxa - maxb)) {
    		 maxa = new_a;
    		 maxb = new_b;
    	 }
    	 else
    	 if ( (new_a - new_b) == (maxa - maxb) && new_a > maxa) {
    		 maxa = new_a;
    		 maxb = new_b;
    	 }

     }

     out.print(maxa+":"+maxb);
     out.flush();
     out.close();

  }

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

  long pow(int x, int m) {
	  if (m == 0)
		  return 1;
	  return x*pow(x, m-1);
  }

  class Reader {

      BufferedReader br;
      StringTokenizer token = null;

      Reader(String file) throws Exception {
          br = new BufferedReader( new InputStreamReader(System.in) );
          //br = new BufferedReader( new FileReader(file) );
      }

      String next() throws Exception {
          while (token == null || !token.hasMoreElements()) {
        	  try {
        		  token = new StringTokenizer(br.readLine());
        	  }
        	  catch (Exception e) {
        		  return null;
        	  }
          }
          return token.nextToken();
      }

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

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

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

      char nextChar() throws Exception {
          return next().charAt(0);
      }

      String nextString() throws IOException {
    	  return br.readLine();
      }

  }
}


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

public class Main {
	MyScanner sc = new MyScanner();
	Scanner sc2 = new Scanner(System.in);
	long start = System.currentTimeMillis();
	long fin = System.currentTimeMillis();
	final int MOD = 1000000007;
	int[] dx = { 1, 0, 0, -1 };
	int[] dy = { 0, 1, -1, 0 };

	void run() {
		ArrayList<Integer> l = new ArrayList<Integer>();
		int n = sc.nextInt();
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = sc.nextInt();
			l.add(a[i]);
		}
		int m = sc.nextInt();
		int[] b = new int[m];
		for (int i = 0; i < m; i++) {
			b[i] = sc.nextInt();
			l.add(b[i]);
		}
		Arrays.sort(a);
		Arrays.sort(b);
		Collections.sort(l);
		int pointA = 0;
		int pointB = 0;
		int max = -Integer.MAX_VALUE / 2;
		for (int i = 0; i < l.size(); i++) {
			int d = l.get(i) - 1;
			int indexA = lower_bound(a, d);
			int indexB = lower_bound(b, d);
			int ppA = (n - indexA) * 3 + indexA * 2;
			int ppB = (m - indexB) * 3 + indexB * 2;
			if (ppA - ppB > max) {
				pointA = ppA;
				pointB = ppB;
				max = ppA - ppB;
			} else if(ppA - ppB == max && ppA > pointA) {
				pointA = ppA;
				pointB = ppB;
			}
		}
		System.out.println(pointA + ":" + pointB);
	}

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

	void debug(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}

	void debug2(int[][] array) {
		for (int i = 0; i < array.length; i++) {
			for (int j = 0; j < array[i].length; j++) {
				System.out.print(array[i][j]);
			}
			System.out.println();
		}
	}

	boolean inner(int h, int w, int limH, int limW) {
		return 0 <= h && h < limH && 0 <= w && w < limW;
	}

	void swap(int[] x, int a, int b) {
		int tmp = x[a];
		x[a] = x[b];
		x[b] = tmp;
	}

	// find minimum i (a[i] >= border)
	int lower_bound(int a[], int border) {
		int l = -1;
		int r = a.length;
		while (r - l > 1) {
			int mid = (l + r) / 2;
			if (border < a[mid]) {
				r = mid;
			} else {
				l = mid;
			}
		}
		// r = l + 1
		return r;
	}

	boolean palindrome(String s) {
		for (int i = 0; i < s.length() / 2; i++) {
			if (s.charAt(i) != s.charAt(s.length() - 1 - i)) {
				return false;
			}
		}
		return true;
	}

	class MyScanner {
		int nextInt() {
			try {
				int c = System.in.read();
				while (c != '-' && (c < '0' || '9' < c))
					c = System.in.read();
				if (c == '-')
					return -nextInt();
				int res = 0;
				do {
					res *= 10;
					res += c - '0';
					c = System.in.read();
				} while ('0' <= c && c <= '9');
				return res;
			} catch (Exception e) {
				return -1;
			}
		}

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

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

		String next() {
			try {
				StringBuilder res = new StringBuilder("");
				int c = System.in.read();
				while (Character.isWhitespace(c))
					c = System.in.read();
				do {
					res.append((char) c);
				} while (!Character.isWhitespace(c = System.in.read()));
				return res.toString();
			} catch (Exception e) {
				return null;
			}
		}

		int[] nextIntArray(int n) {
			int[] in = new int[n];
			for (int i = 0; i < n; i++) {
				in[i] = nextInt();
			}
			return in;
		}

		int[][] nextInt2dArray(int n, int m) {
			int[][] in = new int[n][m];
			for (int i = 0; i < n; i++) {
				in[i] = nextIntArray(m);
			}
			return in;
		}

		double[] nextDoubleArray(int n) {
			double[] in = new double[n];
			for (int i = 0; i < n; i++) {
				in[i] = nextDouble();
			}
			return in;
		}

		long[] nextLongArray(int n) {
			long[] in = new long[n];
			for (int i = 0; i < n; i++) {
				in[i] = nextLong();
			}
			return in;
		}

		char[][] nextCharField(int n, int m) {
			char[][] in = new char[n][m];
			for (int i = 0; i < n; i++) {
				String s = sc.next();
				for (int j = 0; j < m; j++) {
					in[i][j] = s.charAt(j);
				}
			}
			return in;
		}
	}
}


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

public class Main {
	MyScanner sc = new MyScanner();
	Scanner sc2 = new Scanner(System.in);
	long start = System.currentTimeMillis();
	long fin = System.currentTimeMillis();
	final int MOD = 1000000007;
	int[] dx = { 1, 0, 0, -1 };
	int[] dy = { 0, 1, -1, 0 };

	void run() {
		ArrayList<Integer> l = new ArrayList<Integer>();
		int n = sc.nextInt();
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = sc.nextInt();
			l.add(a[i]);
		}
		int m = sc.nextInt();
		int[] b = new int[m];
		for (int i = 0; i < m; i++) {
			b[i] = sc.nextInt();
			l.add(b[i]);
		}
		Arrays.sort(a);
		Arrays.sort(b);
		Collections.sort(l);
		l.add(l.get(l.size()-1) + 1);
		int pointA = 0;
		int pointB = 0;
		int max = -Integer.MAX_VALUE / 2;
		for (int i = 0; i < l.size(); i++) {
			int d = l.get(i) - 1;
			int indexA = lower_bound(a, d);
			int indexB = lower_bound(b, d);
			int ppA = (n - indexA) * 3 + indexA * 2;
			int ppB = (m - indexB) * 3 + indexB * 2;
			if (ppA - ppB > max) {
				pointA = ppA;
				pointB = ppB;
				max = ppA - ppB;
			} else if(ppA - ppB == max && ppA > pointA) {
				pointA = ppA;
				pointB = ppB;
			}
		}
		System.out.println(pointA + ":" + pointB);
	}

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

	void debug(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}

	void debug2(int[][] array) {
		for (int i = 0; i < array.length; i++) {
			for (int j = 0; j < array[i].length; j++) {
				System.out.print(array[i][j]);
			}
			System.out.println();
		}
	}

	boolean inner(int h, int w, int limH, int limW) {
		return 0 <= h && h < limH && 0 <= w && w < limW;
	}

	void swap(int[] x, int a, int b) {
		int tmp = x[a];
		x[a] = x[b];
		x[b] = tmp;
	}

	// find minimum i (a[i] >= border)
	int lower_bound(int a[], int border) {
		int l = -1;
		int r = a.length;
		while (r - l > 1) {
			int mid = (l + r) / 2;
			if (border < a[mid]) {
				r = mid;
			} else {
				l = mid;
			}
		}
		// r = l + 1
		return r;
	}

	boolean palindrome(String s) {
		for (int i = 0; i < s.length() / 2; i++) {
			if (s.charAt(i) != s.charAt(s.length() - 1 - i)) {
				return false;
			}
		}
		return true;
	}

	class MyScanner {
		int nextInt() {
			try {
				int c = System.in.read();
				while (c != '-' && (c < '0' || '9' < c))
					c = System.in.read();
				if (c == '-')
					return -nextInt();
				int res = 0;
				do {
					res *= 10;
					res += c - '0';
					c = System.in.read();
				} while ('0' <= c && c <= '9');
				return res;
			} catch (Exception e) {
				return -1;
			}
		}

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

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

		String next() {
			try {
				StringBuilder res = new StringBuilder("");
				int c = System.in.read();
				while (Character.isWhitespace(c))
					c = System.in.read();
				do {
					res.append((char) c);
				} while (!Character.isWhitespace(c = System.in.read()));
				return res.toString();
			} catch (Exception e) {
				return null;
			}
		}

		int[] nextIntArray(int n) {
			int[] in = new int[n];
			for (int i = 0; i < n; i++) {
				in[i] = nextInt();
			}
			return in;
		}

		int[][] nextInt2dArray(int n, int m) {
			int[][] in = new int[n][m];
			for (int i = 0; i < n; i++) {
				in[i] = nextIntArray(m);
			}
			return in;
		}

		double[] nextDoubleArray(int n) {
			double[] in = new double[n];
			for (int i = 0; i < n; i++) {
				in[i] = nextDouble();
			}
			return in;
		}

		long[] nextLongArray(int n) {
			long[] in = new long[n];
			for (int i = 0; i < n; i++) {
				in[i] = nextLong();
			}
			return in;
		}

		char[][] nextCharField(int n, int m) {
			char[][] in = new char[n][m];
			for (int i = 0; i < n; i++) {
				String s = sc.next();
				for (int j = 0; j < m; j++) {
					in[i][j] = s.charAt(j);
				}
			}
			return in;
		}
	}
}


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

public class MainC {
	Scanner sc = new Scanner(System.in);

	void solve1() {
		ArrayList<Integer> l = new ArrayList<Integer>();
		int n = sc.nextInt();
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = sc.nextInt();
			l.add(a[i]);
		}
		int m = sc.nextInt();
		int[] b = new int[m];
		for (int i = 0; i < m; i++) {
			b[i] = sc.nextInt();
			l.add(b[i]);
		}
		Arrays.sort(a);
		Arrays.sort(b);
		Collections.sort(l);
		l.add(l.get(l.size() - 1) + 1);
		int pointA = 0;
		int pointB = 0;
		int max = -Integer.MAX_VALUE / 2;
		for (int i = 0; i < l.size(); i++) {
			int d = l.get(i) - 1;
			int indexA = lower_bound(a, d);
			int indexB = lower_bound(b, d);
			int ppA = (n - indexA) * 3 + indexA * 2;
			int ppB = (m - indexB) * 3 + indexB * 2;
			if (ppA - ppB > max) {
				pointA = ppA;
				pointB = ppB;
				max = ppA - ppB;
			} else if (ppA - ppB == max && ppA > pointA) {
				pointA = ppA;
				pointB = ppB;
			}
		}
		System.out.println(pointA + ":" + pointB);
	}

	void solve2() {
		ArrayList<Integer> l = new ArrayList<Integer>();
		int n = sc.nextInt();
		for (int i = 0; i < n; i++)
			l.add(sc.nextInt());
		int m = sc.nextInt();
		for (int i = 0; i < m; i++)
			l.add(sc.nextInt());
		Info[] info = new Info[n + m];
		for (int i = 0; i < n + m; i++) {
			info[i] = new Info(i < n ? "my" : "you", l.get(i));
		}
		Arrays.sort(info);
		int maxM, maxY, tmpM, tmpY;
		maxM = tmpM = n * 3;
		maxY = tmpY = m * 3;
		for (int i = 0; i < info.length; i++) {
			if (info[i].team.equals("my")) tmpM--;
			else tmpY--;
			while (i + 1 < info.length && info[i].d == info[i + 1].d) {
				if(info[i+1].team.equals("my"))   tmpM --;
				else  tmpY--;
				i++;
			}
			if (tmpM - tmpY > maxM - maxY) {
				maxM = tmpM;
				maxY = tmpY;
			}
		}
		System.out.println(maxM + ":" + maxY);
	}

	class Info implements Comparable<Info> {
		String team;
		int d;

		public Info(String team, int d) {
			this.team = team;
			this.d = d;
		}

		@Override
		public int compareTo(Info arg0) {
			return this.d - arg0.d;
		}
	}

	public static void main(String[] args) {
		new MainC().solve1();
	}

	void debug(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}

	// find minimum i (a[i] >= border)
	int lower_bound(int a[], int border) {
		int l = -1;
		int r = a.length;

		while (r - l > 1) {
			int mid = (l + r) / 2;
			if (border < a[mid]) {
				r = mid;
			} else {
				l = mid;
			}
		}
		// r = l + 1
		return r;
	}
}


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

public class Main {
	MyScanner sc = new MyScanner();
	Scanner sc2 = new Scanner(System.in);
	long start = System.currentTimeMillis();
	long fin = System.currentTimeMillis();
	final int MOD = 1000000007;
	int[] dx = { 1, 0, 0, -1 };
	int[] dy = { 0, 1, -1, 0 };

	void run() {
		ArrayList<Integer> l = new ArrayList<Integer>();
		int n = sc.nextInt();
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = sc.nextInt();
			l.add(a[i]);
		}
		int m = sc.nextInt();
		int[] b = new int[m];
		for (int i = 0; i < m; i++) {
			b[i] = sc.nextInt();
			l.add(b[i]);
		}
		Arrays.sort(a);
		Arrays.sort(b);
		Collections.sort(l);
		int pointA = 0;
		int pointB = 0;
		int max = -Integer.MAX_VALUE / 2;
		for (int i = 0; i < l.size(); i++) {
			int d = l.get(i) - 1;
			int indexA = lower_bound(a, d);
			int indexB = lower_bound(b, d);
			int ppA = (n - indexA) * 3 + indexA * 2;
			int ppB = (m - indexB) * 3 + indexB * 2;
			if (ppA - ppB > max) {
				pointA = ppA;
				pointB = ppB;
				max = ppA - ppB;
			}
		}
		System.out.println(pointA + ":" + pointB);
	}

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

	void debug(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}

	void debug2(int[][] array) {
		for (int i = 0; i < array.length; i++) {
			for (int j = 0; j < array[i].length; j++) {
				System.out.print(array[i][j]);
			}
			System.out.println();
		}
	}

	boolean inner(int h, int w, int limH, int limW) {
		return 0 <= h && h < limH && 0 <= w && w < limW;
	}

	void swap(int[] x, int a, int b) {
		int tmp = x[a];
		x[a] = x[b];
		x[b] = tmp;
	}

	// find minimum i (a[i] >= border)
	int lower_bound(int a[], int border) {
		int l = -1;
		int r = a.length;
		while (r - l > 1) {
			int mid = (l + r) / 2;
			if (border < a[mid]) {
				r = mid;
			} else {
				l = mid;
			}
		}
		// r = l + 1
		return r;
	}

	boolean palindrome(String s) {
		for (int i = 0; i < s.length() / 2; i++) {
			if (s.charAt(i) != s.charAt(s.length() - 1 - i)) {
				return false;
			}
		}
		return true;
	}

	class MyScanner {
		int nextInt() {
			try {
				int c = System.in.read();
				while (c != '-' && (c < '0' || '9' < c))
					c = System.in.read();
				if (c == '-')
					return -nextInt();
				int res = 0;
				do {
					res *= 10;
					res += c - '0';
					c = System.in.read();
				} while ('0' <= c && c <= '9');
				return res;
			} catch (Exception e) {
				return -1;
			}
		}

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

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

		String next() {
			try {
				StringBuilder res = new StringBuilder("");
				int c = System.in.read();
				while (Character.isWhitespace(c))
					c = System.in.read();
				do {
					res.append((char) c);
				} while (!Character.isWhitespace(c = System.in.read()));
				return res.toString();
			} catch (Exception e) {
				return null;
			}
		}

		int[] nextIntArray(int n) {
			int[] in = new int[n];
			for (int i = 0; i < n; i++) {
				in[i] = nextInt();
			}
			return in;
		}

		int[][] nextInt2dArray(int n, int m) {
			int[][] in = new int[n][m];
			for (int i = 0; i < n; i++) {
				in[i] = nextIntArray(m);
			}
			return in;
		}

		double[] nextDoubleArray(int n) {
			double[] in = new double[n];
			for (int i = 0; i < n; i++) {
				in[i] = nextDouble();
			}
			return in;
		}

		long[] nextLongArray(int n) {
			long[] in = new long[n];
			for (int i = 0; i < n; i++) {
				in[i] = nextLong();
			}
			return in;
		}

		char[][] nextCharField(int n, int m) {
			char[][] in = new char[n][m];
			for (int i = 0; i < n; i++) {
				String s = sc.next();
				for (int j = 0; j < m; j++) {
					in[i][j] = s.charAt(j);
				}
			}
			return in;
		}
	}
}


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

public class MainC {
	Scanner sc = new Scanner(System.in);

	void solve1() {
		ArrayList<Integer> l = new ArrayList<Integer>();
		int n = sc.nextInt();
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = sc.nextInt();
			l.add(a[i]);
		}
		int m = sc.nextInt();
		int[] b = new int[m];
		for (int i = 0; i < m; i++) {
			b[i] = sc.nextInt();
			l.add(b[i]);
		}
		Arrays.sort(a);
		Arrays.sort(b);
		Collections.sort(l);
		l.add(l.get(l.size() - 1) + 1);
		int pointA = 0;
		int pointB = 0;
		int max = -Integer.MAX_VALUE / 2;
		for (int i = 0; i < l.size(); i++) {
			int d = l.get(i) - 1;
			int indexA = lower_bound(a, d);
			int indexB = lower_bound(b, d);
			int ppA = (n - indexA) * 3 + indexA * 2;
			int ppB = (m - indexB) * 3 + indexB * 2;
			if (ppA - ppB > max) {
				pointA = ppA;
				pointB = ppB;
				max = ppA - ppB;
			} else if (ppA - ppB == max && ppA > pointA) {
				pointA = ppA;
				pointB = ppB;
			}
		}
		System.out.println(pointA + ":" + pointB);
	}

	void solve2() {
		ArrayList<Integer> l = new ArrayList<Integer>();
		int n = sc.nextInt();
		for (int i = 0; i < n; i++)
			l.add(sc.nextInt());
		int m = sc.nextInt();
		for (int i = 0; i < m; i++)
			l.add(sc.nextInt());
		Info[] info = new Info[n + m];
		for (int i = 0; i < n + m; i++) {
			info[i] = new Info(i < n ? "my" : "you", l.get(i));
		}
		Arrays.sort(info);
		int maxM, maxY, tmpM, tmpY;
		maxM = tmpM = n * 3;
		maxY = tmpY = m * 3;
		for (int i = 0; i < info.length; i++) {
			if (info[i].team.equals("my")) tmpM--;
			else tmpY--;
			while (i + 1 < info.length && info[i].d == info[i + 1].d) {
				if(info[i+1].team.equals("my"))   tmpM --;
				else  tmpY--;
				i++;
			}
			if (tmpM - tmpY > maxM - maxY) {
				maxM = tmpM;
				maxY = tmpY;
			}
		}
		System.out.println(maxM + ":" + maxY);
	}

	class Info implements Comparable<Info> {
		String team;
		int d;

		public Info(String team, int d) {
			this.team = team;
			this.d = d;
		}

		@Override
		public int compareTo(Info arg0) {
			return this.d - arg0.d;
		}
	}

	public static void main(String[] args) {
		new MainC().solve2();
	}

	void debug(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}

	// find minimum i (a[i] >= border)
	int lower_bound(int a[], int border) {
		int l = -1;
		int r = a.length;

		while (r - l > 1) {
			int mid = (l + r) / 2;
			if (border < a[mid]) {
				r = mid;
			} else {
				l = mid;
			}
		}
		// r = l + 1
		return r;
	}
}


import java.io.*;
import java.math.*;
import java.util.*;
import java.util.concurrent.*;

public class P493C {

  int search(int [] a, int v) {
    int lo = -1;
    int hi = a.length;

    while ((hi - lo) > 1) {
      int mid = (lo + hi) >>> 1;
      if (a[mid] <= v) {
        lo = mid;
      } else {
        hi = mid;
      }
    }

    return hi;
  }

  long points(int [] x, int d) {
    return (3L * x.length - search(x, d));
  }

  @SuppressWarnings("unchecked")
  public void run() throws Exception {
    TreeSet<Integer> dist = new TreeSet<Integer>();
    dist.add(0);

    int [] a = new int [nextInt()];
    for (int i = 0; i < a.length; i++) {
      a[i] = nextInt();
      dist.add(a[i]);
    }
    Arrays.sort(a);

    int [] b = new int [nextInt()];
    for (int i = 0; i < b.length; i++) {
      b[i] = nextInt();
      dist.add(b[i]);
    }
    Arrays.sort(b);

    long pA = Integer.MIN_VALUE;
    long pB = Integer.MAX_VALUE;
    for (int d : dist) {
      long pdA = points(a, d);
      long pdB = points(b, d);
      if ((pdA - pdB) > (pA - pB)) {
        pA = pdA;
        pB = pdB;
      }
    }

    println(pA + ":" + pB);
  }

  public static void main(String... args) throws Exception {
    br = new BufferedReader(new InputStreamReader(System.in));
    pw = new PrintWriter(new BufferedOutputStream(System.out));
    new P493C().run();
    br.close();
    pw.close();
  }

  static BufferedReader br;
  static PrintWriter pw;
  StringTokenizer stok;

  String nextToken() throws IOException {
    while (stok == null || !stok.hasMoreTokens()) {
      String s = br.readLine();
      if (s == null) { return null; }
      stok = new StringTokenizer(s);
    }
    return stok.nextToken();
  }

  void print(byte b) { print("" + b); }
  void print(int i) { print("" + i); }
  void print(long l) { print("" + l); }
  void print(double d) { print("" + d); }
  void print(char c) { print("" + c); }
  void print(Object o) {
    if (o instanceof int[]) { print(Arrays.toString((int [])o));
    } else if (o instanceof long[]) { print(Arrays.toString((long [])o));
    } else if (o instanceof char[]) { print(Arrays.toString((char [])o));
    } else if (o instanceof byte[]) { print(Arrays.toString((byte [])o));
    } else if (o instanceof short[]) { print(Arrays.toString((short [])o));
    } else if (o instanceof boolean[]) { print(Arrays.toString((boolean [])o));
    } else if (o instanceof float[]) { print(Arrays.toString((float [])o));
    } else if (o instanceof double[]) { print(Arrays.toString((double [])o));
    } else if (o instanceof Object[]) { print(Arrays.toString((Object [])o));
    } else { println("" + o); }
  }
  void print(String s) { pw.print(s); }
  void println() { println(""); }
  void println(byte b) { println("" + b); }
  void println(int i) { println("" + i); }
  void println(long l) { println("" + l); }
  void println(double d) { println("" + d); }
  void println(char c) { println("" + c); }
  void println(Object o) { print("" + o); }
  void println(String s) { pw.println(s); }
  int nextInt() throws IOException { return Integer.parseInt(nextToken()); }
  long nextLong() throws IOException { return Long.parseLong(nextToken()); }
  double nextDouble() throws IOException { return Double.parseDouble(nextToken()); }
  char nextChar() throws IOException { return (char) (br.read()); }
  String next() throws IOException { return nextToken(); }
  String nextLine() throws IOException { return br.readLine(); }
  int [] readInt(int size) throws IOException {
    int [] array = new int [size];
    for (int i = 0; i < size; i++) { array[i] = nextInt(); }
    return array;
  }
  long [] readLong(int size) throws IOException {
    long [] array = new long [size];
    for (int i = 0; i < size; i++) { array[i] = nextLong(); }
    return array;
  }
  double [] readDouble(int size) throws IOException {
    double [] array = new double [size];
    for (int i = 0; i < size; i++) { array[i] = nextDouble(); }
    return array;
  }
  String [] readLines(int size) throws IOException {
    String [] array = new String [size];
    for (int i = 0; i < size; i++) { array[i] = nextLine(); }
    return array;
  }
}


import java.io.*;
import java.math.*;
import java.util.*;
import java.util.concurrent.*;

public class P493C {

  int search(int [] a, int v) {
    int lo = -1;
    int hi = a.length;

    while ((hi - lo) > 1) {
      int mid = (lo + hi) >>> 1;
      if (a[mid] <= v) {
        lo = mid;
      } else {
        hi = mid;
      }
    }

    return hi;
  }

  long points(int [] x, int d) {
    return (3L * x.length - search(x, d));
  }

  @SuppressWarnings("unchecked")
  public void run() throws Exception {
    TreeSet<Integer> dist = new TreeSet<Integer>();
    dist.add(0);

    int [] a = new int [nextInt()];
    for (int i = 0; i < a.length; i++) {
      a[i] = nextInt();
      dist.add(a[i]);
    }
    Arrays.sort(a);

    int [] b = new int [nextInt()];
    for (int i = 0; i < b.length; i++) {
      b[i] = nextInt();
      dist.add(b[i]);
    }
    Arrays.sort(b);
System.err.println("dist : " + dist);

    long pA = Long.MIN_VALUE;
    long pB = Long.MAX_VALUE;
    for (int d : dist) {
      long pdA = points(a, d);
      long pdB = points(b, d);
      if ((pdA - pdB) > (pA - pB)) {
        pA = pdA;
        pB = pdB;
      }
System.err.println("points[" + d + "] (a) = " + pdA + "\tpoints[" + d + "] (b) = " + pdB);
    }

    println(pA + ":" + pB);
  }

  public static void main(String... args) throws Exception {
    br = new BufferedReader(new InputStreamReader(System.in));
    pw = new PrintWriter(new BufferedOutputStream(System.out));
    new P493C().run();
    br.close();
    pw.close();
  }

  static BufferedReader br;
  static PrintWriter pw;
  StringTokenizer stok;

  String nextToken() throws IOException {
    while (stok == null || !stok.hasMoreTokens()) {
      String s = br.readLine();
      if (s == null) { return null; }
      stok = new StringTokenizer(s);
    }
    return stok.nextToken();
  }

  void print(byte b) { print("" + b); }
  void print(int i) { print("" + i); }
  void print(long l) { print("" + l); }
  void print(double d) { print("" + d); }
  void print(char c) { print("" + c); }
  void print(Object o) {
    if (o instanceof int[]) { print(Arrays.toString((int [])o));
    } else if (o instanceof long[]) { print(Arrays.toString((long [])o));
    } else if (o instanceof char[]) { print(Arrays.toString((char [])o));
    } else if (o instanceof byte[]) { print(Arrays.toString((byte [])o));
    } else if (o instanceof short[]) { print(Arrays.toString((short [])o));
    } else if (o instanceof boolean[]) { print(Arrays.toString((boolean [])o));
    } else if (o instanceof float[]) { print(Arrays.toString((float [])o));
    } else if (o instanceof double[]) { print(Arrays.toString((double [])o));
    } else if (o instanceof Object[]) { print(Arrays.toString((Object [])o));
    } else { println("" + o); }
  }
  void print(String s) { pw.print(s); }
  void println() { println(""); }
  void println(byte b) { println("" + b); }
  void println(int i) { println("" + i); }
  void println(long l) { println("" + l); }
  void println(double d) { println("" + d); }
  void println(char c) { println("" + c); }
  void println(Object o) { print("" + o); }
  void println(String s) { pw.println(s); }
  int nextInt() throws IOException { return Integer.parseInt(nextToken()); }
  long nextLong() throws IOException { return Long.parseLong(nextToken()); }
  double nextDouble() throws IOException { return Double.parseDouble(nextToken()); }
  char nextChar() throws IOException { return (char) (br.read()); }
  String next() throws IOException { return nextToken(); }
  String nextLine() throws IOException { return br.readLine(); }
  int [] readInt(int size) throws IOException {
    int [] array = new int [size];
    for (int i = 0; i < size; i++) { array[i] = nextInt(); }
    return array;
  }
  long [] readLong(int size) throws IOException {
    long [] array = new long [size];
    for (int i = 0; i < size; i++) { array[i] = nextLong(); }
    return array;
  }
  double [] readDouble(int size) throws IOException {
    double [] array = new double [size];
    for (int i = 0; i < size; i++) { array[i] = nextDouble(); }
    return array;
  }
  String [] readLines(int size) throws IOException {
    String [] array = new String [size];
    for (int i = 0; i < size; i++) { array[i] = nextLine(); }
    return array;
  }
}


import java.io.*;
import java.math.*;
import java.util.*;
import java.util.concurrent.*;

public class P493C {

  int search(int [] a, int v) {
    int lo = -1;
    int hi = a.length;

    while ((hi - lo) > 1) {
      int mid = (lo + hi) >>> 1;
      if (a[mid] <= v) {
        lo = mid;
      } else {
        hi = mid;
      }
    }

    return hi;
  }

  long points(int [] x, int d) {
    return (3L * x.length - search(x, d));
  }

  @SuppressWarnings("unchecked")
  public void run() throws Exception {
    TreeSet<Integer> dist = new TreeSet<Integer>();
    dist.add(0);

    int [] a = new int [nextInt()];
    for (int i = 0; i < a.length; i++) {
      a[i] = nextInt();
      dist.add(a[i]);
    }
    Arrays.sort(a);

    int [] b = new int [nextInt()];
    for (int i = 0; i < b.length; i++) {
      b[i] = nextInt();
      dist.add(b[i]);
    }
    Arrays.sort(b);
System.err.println("dist : " + dist);

    long pA = Integer.MIN_VALUE;
    long pB = Integer.MAX_VALUE;
    for (int d : dist) {
      long pdA = points(a, d);
      long pdB = points(b, d);
      if ((pdA - pdB) > (pA - pB)) {
        pA = pdA;
        pB = pdB;
      }
System.err.println("points[" + d + "] (a) = " + pdA + "\tpoints[" + d + "] (b) = " + pdB);
    }

    println(pA + ":" + pB);
  }

  public static void main(String... args) throws Exception {
    br = new BufferedReader(new InputStreamReader(System.in));
    pw = new PrintWriter(new BufferedOutputStream(System.out));
    new P493C().run();
    br.close();
    pw.close();
  }

  static BufferedReader br;
  static PrintWriter pw;
  StringTokenizer stok;

  String nextToken() throws IOException {
    while (stok == null || !stok.hasMoreTokens()) {
      String s = br.readLine();
      if (s == null) { return null; }
      stok = new StringTokenizer(s);
    }
    return stok.nextToken();
  }

  void print(byte b) { print("" + b); }
  void print(int i) { print("" + i); }
  void print(long l) { print("" + l); }
  void print(double d) { print("" + d); }
  void print(char c) { print("" + c); }
  void print(Object o) {
    if (o instanceof int[]) { print(Arrays.toString((int [])o));
    } else if (o instanceof long[]) { print(Arrays.toString((long [])o));
    } else if (o instanceof char[]) { print(Arrays.toString((char [])o));
    } else if (o instanceof byte[]) { print(Arrays.toString((byte [])o));
    } else if (o instanceof short[]) { print(Arrays.toString((short [])o));
    } else if (o instanceof boolean[]) { print(Arrays.toString((boolean [])o));
    } else if (o instanceof float[]) { print(Arrays.toString((float [])o));
    } else if (o instanceof double[]) { print(Arrays.toString((double [])o));
    } else if (o instanceof Object[]) { print(Arrays.toString((Object [])o));
    } else { println("" + o); }
  }
  void print(String s) { pw.print(s); }
  void println() { println(""); }
  void println(byte b) { println("" + b); }
  void println(int i) { println("" + i); }
  void println(long l) { println("" + l); }
  void println(double d) { println("" + d); }
  void println(char c) { println("" + c); }
  void println(Object o) { print("" + o); }
  void println(String s) { pw.println(s); }
  int nextInt() throws IOException { return Integer.parseInt(nextToken()); }
  long nextLong() throws IOException { return Long.parseLong(nextToken()); }
  double nextDouble() throws IOException { return Double.parseDouble(nextToken()); }
  char nextChar() throws IOException { return (char) (br.read()); }
  String next() throws IOException { return nextToken(); }
  String nextLine() throws IOException { return br.readLine(); }
  int [] readInt(int size) throws IOException {
    int [] array = new int [size];
    for (int i = 0; i < size; i++) { array[i] = nextInt(); }
    return array;
  }
  long [] readLong(int size) throws IOException {
    long [] array = new long [size];
    for (int i = 0; i < size; i++) { array[i] = nextLong(); }
    return array;
  }
  double [] readDouble(int size) throws IOException {
    double [] array = new double [size];
    for (int i = 0; i < size; i++) { array[i] = nextDouble(); }
    return array;
  }
  String [] readLines(int size) throws IOException {
    String [] array = new String [size];
    for (int i = 0; i < size; i++) { array[i] = nextLine(); }
    return array;
  }
}


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

/*
 * author:yanghui
 */
public class C493 {

	FastIO scan = new FastIO(new BufferedOutputStream(System.out));

	public int Search(int a[], int t) {
		int left = 0, right = a.length - 1;
		while (left != right) {
			int mid = (left + right) / 2;
			if (a[mid] <= t)
				left = mid + 1;
			else
				right = mid;
		}
		return left;
	}

	public int CalScall(int a[], int d) {
		int index = Search(a, d);
		return index * 2 + (a.length - index - 1) * 3;
	}

	public void run() {

		int n = scan.nextInt();
		int a[] = new int[n + 1];
		for (int i = 0; i < n; i++) {
			a[i] = scan.nextInt();
		}
		a[n] = Integer.MAX_VALUE;
		int m = scan.nextInt();
		int b[] = new int[m + 1];
		for (int i = 0; i < m; i++) {
			b[i] = scan.nextInt();
		}
		b[m] = Integer.MAX_VALUE;
		Arrays.sort(a);
		Arrays.sort(b);

		String ans = "";
		int cur = Integer.MIN_VALUE;

		cur = CalScall(a , 0) - CalScall(b , 0);
		ans = CalScall(a , 0) +":"+ CalScall(b , 0);

		int max = CalScall(a,0);

		for (int i = 0; i < n; i++) {
			int scall_a = CalScall(a, a[i]);
			int scall_b = CalScall(b, a[i]);
			if (scall_a - scall_b > cur || (scall_a - scall_b == cur && scall_a > max)) {
				cur = scall_a - scall_b;
				ans = scall_a + ":" + scall_b;
				max = scall_a;
			}
		}

		for (int i = 0; i < m; i++) {
			int scall_a = CalScall(a, b[i]);
			int scall_b = CalScall(b,b[i]);
			if (scall_a - scall_b > cur || (scall_a - scall_b == cur && scall_a > max)) {
				cur = scall_a - scall_b;
				ans = scall_a + ":" + scall_b;
				max = scall_a;
			}
		}

		scan.println(ans);

		scan.close();
	}

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

	class FastIO extends PrintWriter {
		BufferedReader br;
		StringTokenizer st;

		public FastIO(OutputStream psOut) {
			super(psOut);
			try {
				br = new BufferedReader(new FileReader(new File("in")));
			} catch (Exception e) {
				br = new BufferedReader(new InputStreamReader(System.in));
			}
			eat("");
		}

		public void eat(String s) {
			st = new StringTokenizer(s);
		}

		public String nextLine() {
			try {
				return br.readLine();
			} catch (IOException e) {
				throw new IOError(e);
			}
		}

		public boolean hasNext() {
			while (!st.hasMoreTokens()) {
				String s = nextLine();
				if (s == null)
					return false;
				eat(s);
			}
			return true;
		}

		public String next() {
			hasNext();
			return st.nextToken();
		}

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

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

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

		public void println(Object... o) {
			for (Object i : o)
				print(i + " ");
			println();
		}
	}
}


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

/*
 * author:yanghui
 */
public class C493 {

	FastIO scan = new FastIO(new BufferedOutputStream(System.out));

	public int Search(int a[], int t) {
		int left = 0, right = a.length - 1;
		while (left != right) {
			int mid = (left + right) / 2;
			if (a[mid] <= t)
				left = mid + 1;
			else
				right = mid;
		}
		return left;
	}

	public int CalScall(int a[], int d) {
		int index = Search(a, d);
		return index * 2 + (a.length - index - 1) * 3;
	}

	public void run() {

		int n = scan.nextInt();
		int a[] = new int[n + 1];
		for (int i = 0; i < n; i++) {
			a[i] = scan.nextInt();
		}
		a[n] = Integer.MAX_VALUE;
		int m = scan.nextInt();
		int b[] = new int[m + 1];
		for (int i = 0; i < m; i++) {
			b[i] = scan.nextInt();
		}
		b[m] = Integer.MAX_VALUE;
		Arrays.sort(a);
		Arrays.sort(b);

		String ans = "";
		int cur = Integer.MIN_VALUE;

		cur = CalScall(a , 0) - CalScall(b , 0);
		ans = CalScall(a , 0) +":"+ CalScall(b , 0);

		for (int i = 0; i < n; i++) {
			int scall_a = CalScall(a, a[i]);
			int scall_b = CalScall(b, a[i]);
			if (scall_a - scall_b > cur) {
				cur = scall_a - scall_b;
				ans = scall_a + ":" + scall_b;
			}
		}

		for (int i = 0; i < m; i++) {
			int scall_a = CalScall(a, b[i]);
			int scall_b = CalScall(b,b[i]);
			if (scall_a - scall_b > cur) {
				cur = scall_a - scall_b;
				ans = scall_a + ":" + scall_b;
			}
		}

		scan.println(ans);

		scan.close();
	}

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

	class FastIO extends PrintWriter {
		BufferedReader br;
		StringTokenizer st;

		public FastIO(OutputStream psOut) {
			super(psOut);
			try {
				br = new BufferedReader(new FileReader(new File("in")));
			} catch (Exception e) {
				br = new BufferedReader(new InputStreamReader(System.in));
			}
			eat("");
		}

		public void eat(String s) {
			st = new StringTokenizer(s);
		}

		public String nextLine() {
			try {
				return br.readLine();
			} catch (IOException e) {
				throw new IOError(e);
			}
		}

		public boolean hasNext() {
			while (!st.hasMoreTokens()) {
				String s = nextLine();
				if (s == null)
					return false;
				eat(s);
			}
			return true;
		}

		public String next() {
			hasNext();
			return st.nextToken();
		}

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

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

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

		public void println(Object... o) {
			for (Object i : o)
				print(i + " ");
			println();
		}
	}
}


import java.io.*;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Locale;
import java.util.StringTokenizer;

public class Main {

    private static BufferedReader in;
    private static PrintWriter out;
    private static StringTokenizer tok = new StringTokenizer("");

    public static void main(String[] args) {
        try {
            if (System.getProperty("ONLINE_JUDGE") != null) {
                in = new BufferedReader(new InputStreamReader(System.in));
                out = new PrintWriter(System.out);
            } else {
                in = new BufferedReader(new FileReader("input.txt"));
                out = new PrintWriter("output.txt");
            }

            Locale.setDefault(Locale.US);
            solve();
            in.close();
            out.close();
        } catch (Throwable e) {
            e.printStackTrace();
        }
    }

    private static String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine());
        }
        return tok.nextToken();
    }

    private static int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    private static byte readByte() throws IOException {
        return Byte.parseByte(readString());
    }

    private static Long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    private static double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }

    private static void solve() throws IOException {
        int n1 = readInt();
        Long[] first = new Long[n1];
        for (int i = 0; i < n1; i++) {
            first[i] = readLong();
        }

        int n2 = readInt();
        Long[][] all = new Long[n1 + n2][2];
        for (int i = 0; i < n1; i++) {
            all[i][0] = first[i];
            all[i][1] = 0L;
        }
        for (int i = n1; i < all.length; i++) {
            all[i][0] = readLong();
            all[i][1] = 1L;
        }

        Arrays.sort(all, new Comparator<Long[]>() {
            @Override
            public int compare(Long[] o1, Long[] o2) {
                return o1[0].compareTo(o2[0]);
            }
        });

        long a = n1 * 3;
        long b = n2 * 3;

        long max = a - b;
        long maxA = a;
        long maxB = b;

        long d;
        int i = 0;
        while (i < all.length) {
            d = all[i][0];

            int j = i;
            while (j < all.length && all[j][0] == d) {
                if (all[j][1] == 0) {
                    a--;
                } else {
                    b--;
                }

                if (a - b > max) {
                    max = a - b;
                    maxA = a;
                    maxB = b;
                }
                j++;
            }

            i = j;
        }

        out.printf("%d:%d", maxA, maxB);
    }
}


import java.io.*;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Locale;
import java.util.StringTokenizer;

public class Main {

    private static BufferedReader in;
    private static PrintWriter out;
    private static StringTokenizer tok = new StringTokenizer("");

    public static void main(String[] args) {
        try {
            if (System.getProperty("ONLINE_JUDGE") != null) {
                in = new BufferedReader(new InputStreamReader(System.in));
                out = new PrintWriter(System.out);
            } else {
                in = new BufferedReader(new FileReader("input.txt"));
                out = new PrintWriter("output.txt");
            }

            Locale.setDefault(Locale.US);
            solve();
            in.close();
            out.close();
        } catch (Throwable e) {
            e.printStackTrace();
        }
    }

    private static String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine());
        }
        return tok.nextToken();
    }

    private static int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    private static byte readByte() throws IOException {
        return Byte.parseByte(readString());
    }

    private static Long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    private static double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }

    private static void solve() throws IOException {
        int n1 = readInt();
        Long[] first = new Long[n1];
        for (int i = 0; i < n1; i++) {
            first[i] = readLong();
        }

        int n2 = readInt();
        Long[][] all = new Long[n1 + n2][2];
        for (int i = 0; i < n1; i++) {
            all[i][0] = first[i];
            all[i][1] = 0L;
        }
        for (int i = n1; i < all.length; i++) {
            all[i][0] = readLong();
            all[i][1] = 1L;
        }

        Arrays.sort(all, new Comparator<Long[]>() {
            @Override
            public int compare(Long[] o1, Long[] o2) {
                return o1[0].compareTo(o2[0]);
            }
        });

        long a = n1 * 3;
        long b = n2 * 3;

        long max = a - b;
        long maxA = a;
        long maxB = b;

        long d;
        int i = 0;
        while (i < all.length) {
            d = all[i][0];

            int j = i;
            while (j < all.length && all[j][0] == d) {
                if (all[j][1] == 0) {
                    a--;
                } else {
                    b--;
                }

                if (a - b > max) {
                    max = a - b;
                    maxA = a;
                    maxB = b;
                }
                j++;
            }

            i = j + 1;
        }

        out.printf("%d:%d", maxA, maxB);
    }
}


import java.io.*;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Locale;
import java.util.StringTokenizer;

public class Main {

    private static BufferedReader in;
    private static PrintWriter out;
    private static StringTokenizer tok = new StringTokenizer("");

    public static void main(String[] args) {
        try {
            if (System.getProperty("ONLINE_JUDGE") != null) {
                in = new BufferedReader(new InputStreamReader(System.in));
                out = new PrintWriter(System.out);
            } else {
                in = new BufferedReader(new FileReader("input.txt"));
                out = new PrintWriter("output.txt");
            }

            Locale.setDefault(Locale.US);
            solve();
            in.close();
            out.close();
        } catch (Throwable e) {
            e.printStackTrace();
        }
    }

    private static String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine());
        }
        return tok.nextToken();
    }

    private static int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    private static byte readByte() throws IOException {
        return Byte.parseByte(readString());
    }

    private static Long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    private static double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }

    private static void solve() throws IOException {
        int n1 = readInt();
        long[] first = new long[n1];
        for (int i = 0; i < n1; i++) {
            first[i] = readLong();
        }

        int n2 = readInt();
        long[][] all = new long[n1 + n2][2];
        for (int i = 0; i < n1; i++) {
            all[i][0] = first[i];
            all[i][1] = 0L;
        }
        for (int i = n1; i < all.length; i++) {
            all[i][0] = readLong();
            all[i][1] = 1L;
        }

        Arrays.sort(all, new Comparator<long[]>() {
            @Override
            public int compare(long[] o1, long[] o2) {
                return new Long(o1[0]).compareTo(o2[0]);
            }
        });

        long a = n1 * 3;
        long b = n2 * 3;

        long max = a - b;
        long maxA = a;
        long maxB = b;

        long d;
        int i = 0;
        while (i < all.length) {
            d = all[i][0];

            int j = i;
            while (j < all.length && all[j][0] == d) {
                if (all[j][1] == 0) {
                    a--;
                } else {
                    b--;
                }

                if (a - b > max) {
                    max = a - b;
                    maxA = a;
                    maxB = b;
                }
                j++;
            }

            i = j;
        }

        out.printf("%d:%d", maxA, maxB);
    }
}


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;
            ww.println(xx);
            if(xx > diff){
                diff = xx;
                ansa = suma;
                ansb = sumb;
            }
        }

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

    }
}


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();
        Node[] ar = new Node[400010];
        int cn = 0;
        for(int i=0;i<n;i++)
            ar[cn++] = new Node(s.nextInt(),0);

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

        long suma = 0;
        long sumb = 0;
        long ansa = Long.MIN_VALUE;
        long ansb = Long.MIN_VALUE;

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

        for(int i=0;i<cn;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.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);

    }
}