Vasya follows a basketball game and marks the distances from which each team makes a throw. He knows that each successful throw has value of either 2 or 3 points. A throw is worth 2 points if the distance it was made from doesn't exceed some value of d meters, and a throw is worth 3 points if the distance is larger than d meters, where d is some non-negative integer.

Vasya would like the advantage of the points scored by the first team (the points of the first team minus the points of the second team) to be maximum. For that he can mentally choose the value of d. Help him to do that.

Input

The first line contains integer n (1 ≤ n ≤ 2·105) — the number of throws of the first team. Then follow n integer numbers — the distances of throws ai (1 ≤ ai ≤ 2·109). 

Then follows number m (1 ≤ m ≤ 2·105) — the number of the throws of the second team. Then follow m integer numbers — the distances of throws of bi (1 ≤ bi ≤ 2·109).

Output

Print two numbers in the format a:b — the score that is possible considering the problem conditions where the result of subtraction a - b is maximum. If there are several such scores, find the one in which number a is maximum.

Examples

Input

3
1 2 3
2
5 6


Output

9:6


Input

5
6 7 8 9 10
5
1 2 3 4 5


Output

15:10
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.PriorityQueue;
import java.util.TreeSet;
public class Main {
	public static void main(String[] args) throws NumberFormatException, IOException{
		ContestScanner in = new ContestScanner();
		int n = in.nextInt();
		long[] a = new long[n];
		PriorityQueue<Long> qua = new PriorityQueue<Long>(1,new Reverse());
		long maxsub = 0;
		long nowsub = 0;
		long asum = 0;
		for(int i=0; i<n; i++){
			a[i] = in.nextLong();
			qua.add(a[i]);
			asum += 2;
		}
		int m = in.nextInt();
		long[] b = new long[m];
		PriorityQueue<Long> qub = new PriorityQueue<Long>(1,new Reverse());
		long bsum = 0;
		for(int i=0; i<m; i++){
			b[i] = in.nextLong();
			qub.add(b[i]);
			bsum += 2;
		}
//		int maxIdx = 0;
		nowsub = asum-bsum;
		maxsub = nowsub;
		long maxa = asum;
		long maxb = bsum;
		while(!qua.isEmpty() && !qub.isEmpty()){
			long at = qua.peek();
			long bt = qub.peek();
			if(at == bt){
				while(!qub.isEmpty() && qub.peek() == bt){
					bsum++;
					qub.poll();
				}
				while(!qua.isEmpty() && qua.peek() == at){
					asum++;
					qua.poll();
				}
			}else if(at < bt){
				while(!qub.isEmpty() && qub.peek() == bt){
					bsum++;
					qub.poll();
				}
			}else if(at > bt){
				while(!qua.isEmpty() && qua.peek() == at){
					asum++;
					qua.poll();
				}
			}
			nowsub = asum-bsum;
			if(nowsub >= maxsub){
				System.err.println(maxsub);
				maxsub = nowsub;
				maxa = asum;
				maxb = bsum;
			}
		}
		if(!qua.isEmpty()){
			asum += qua.size();
			nowsub = asum - bsum;
			if(nowsub >= maxsub){
				maxsub = nowsub;
				maxa = asum;
				maxb = bsum;
			}
		}
		System.out.println(maxa+":"+maxb);
	}
	
}

class MyComp implements Comparator<int[]>{
	public int compare(int[] a, int[] b) {
		return a[0] - b[0];
	}
}


class Reverse implements Comparator<Long>{
	public int compare(Long arg0, Long arg1) {
		return Long.compare(arg1, arg0);
	}
}

class Node{
	int id;
	List<Node> edge = new ArrayList<Node>();
	public Node(int id){
		this.id = id;
	}
	public void createEdge(Node node){
		edge.add(node);
	}
}


class NodeW{
	int id;
	List<NodeW> edge = new ArrayList<NodeW>();
	List<Integer> costList = new ArrayList<Integer>();
	public NodeW(int id) {
		this.id = id;
	}
	public void createEdge(NodeW node, int cost) {
		edge.add(node);
		costList.add(cost);
	}
}

class Range<T extends Comparable<T>> implements Comparable<Range<T>>{
	T start;
	T end;
	public Range(T start, T end){
		this.start = start;
		this.end = end;
	}
	public boolean inRange(T val){
		if(start.compareTo(val) <= 0 && end.compareTo(val) >= 0){
			return true;
		}
		return false;
	}
	
	public boolean isCommon(Range<T> range){
		if(inRange(range.start) || inRange(range.end) || range.inRange(start)){
			return true;
		}
		return false;
	}
	
	public Range<T> connect(Range<T> range){
		if(!isCommon(range)) return null;
		Range<T> res = new Range<T>(start.compareTo(range.start) <= 0 ? start : range.start,
				end.compareTo(range.end) >= 0 ? end : range.end);
		return res;
	}
	
	public boolean connectToThis(Range<T> range){
		if(!isCommon(range)) return false;
		start = start.compareTo(range.start) <= 0 ? start : range.start;
		end = end.compareTo(range.end) >= 0 ? end : range.end;
		return true;
	}
	@Override
	public int compareTo(Range<T> range) {
		int res = start.compareTo(range.start);
		if(res == 0) return end.compareTo(range.end);
		return res;
	}
	
	public String toString(){
		return "["+start+","+end+"]";
	}
}

class RangeSet<T extends Comparable<T>>{
	TreeSet<Range<T>> ranges = new TreeSet<Range<T>>();
	public void add(Range<T> range){
		Range<T> con = ranges.floor(range);
		if(con != null){
			if(con.connectToThis(range))
				range = con;
		}
		con = ranges.ceiling(range);
		while(con != null && range.connectToThis(con)){
			ranges.remove(con);
			con = ranges.ceiling(range);
		}
		ranges.add(range);
	}
	
	public String toString(){
		StringBuilder bld = new StringBuilder();
		for(Range<T> r: ranges){
			bld.append(r+"\n");
		}
		return bld.toString();
	}
}


class MyMath{
	public static long fact(long n){
		long res = 1;
		while(n > 0){
			res *= n--;
		}
		return res;
	}
	public static long[][] pascalT(int n){
		long[][] tri = new long[n][];
		for(int i=0; i<n; i++){
			tri[i] = new long[i+1];
			for(int j=0; j<i+1; j++){
				if(j == 0 || j == i){
					tri[i][j] = 1;
				}else{
					tri[i][j] = tri[i-1][j-1] + tri[i-1][j];
				}
			}
		}
		return tri;
	}
}

class ContestScanner{
	private BufferedReader reader;
	private String[] line;
	private int idx;
	public ContestScanner() throws FileNotFoundException{
		reader = new BufferedReader(new InputStreamReader(System.in));
	}
	
	public String nextToken() throws IOException{
		if(line == null || line.length <= idx){
			line = reader.readLine().trim().split(" ");
			idx = 0;
		}
		return line[idx++];
	}
	
	public long nextLong() throws IOException, NumberFormatException{
		return Long.parseLong(nextToken());
	}
	
	public int nextInt() throws NumberFormatException, IOException{
		return (int)nextLong();
	}
	
	public double nextDouble() throws NumberFormatException, IOException{
		return Double.parseDouble(nextToken());
	}
}