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.*;
import java.util.*;

public class Main 
{

	

	static int n , m ;
	static TreeSet<Integer> ts;
	static HashMap<Long,Integer> hm; 
	
	static HashMap<Long , Integer> distances;
	static HashMap<Long , Integer > a,b;
	
	static ArrayList<node> aa,bb;
	static ArrayList<Long> dist;
	
	static int array[][];
	
	public static void main(String[] args) 
	{
	
		
		MyScanner sc = new MyScanner();
		
		
		distances = new HashMap<Long, Integer>();
		a = new HashMap<Long , Integer >();
		b = new HashMap<Long , Integer >();
		aa = new ArrayList<node>();
		bb = new ArrayList<node>();
		dist = new ArrayList<Long>();
		
		n = sc.nextInt();
		
		long distance;
		
		distances.put(0L , 1);
		
		for( int i = 0 ; i < n; ++i ){
			distance = sc.nextLong();
			
			if( a.containsKey(distance))
			a.put( distance, a.get(distance) + 1  );
			
			else{
			a.put(distance, 1);
			distances.put(distance, 1);
			distances.put(distance+1, 1);
		
			}
		}
		
		
		
		m = sc.nextInt();
		
		
		for( int i = 0 ; i < m; ++i ){
			distance = sc.nextLong();
			
			if( b.containsKey(distance))
			b.put( distance, b.get(distance) + 1  );
			
			else{
			b.put(distance, 1);
			distances.put(distance, 1);
			distances.put(distance+1, 1);
			}
		}
		
		
		for( long l : a.keySet())
		{
			aa.add( new node(l,a.get(l)));
		}
		
		for( long l : b.keySet())
		{
			bb.add( new node(l,b.get(l)));
		}
	
		for( long l : distances.keySet())
		{
			dist.add( l);
		}
	
		
		Collections.sort(aa);
		Collections.sort(bb);
		Collections.sort(dist);
		
	
	
		
		
		long[] aarray = new long[aa.size()];
		long[] barray = new long[bb.size()];
		
		aarray[0] = aa.get(0).count;
		barray[0] = bb.get(0).count;
		
		for( int i = 1 ; i < aa.size(); ++i)
			aarray[i] = aarray[i-1] + aa.get(i).count;
		
		for( int i = 1 ; i < bb.size(); ++i)
			barray[i] = barray[i-1] + bb.get(i).count;
		
	
		
		long suma = aarray[ aa.size() -1 ];
		long sumb = barray[ bb.size() -1 ];
		
		long ansa = 0 ,ansb = 0 ;
		long dif = Long.MIN_VALUE ;
		
		
		for( long d : dist){
			
			//System.out.print( "At "  + d );
			
			int x = Collections.binarySearch(aa, new node(d,0));
			int y = Collections.binarySearch(bb, new node(d,0));
			
			if( x < 0 ) x = -2-x;
			if( y < 0 ) y = -2-y;
			
			long newa = 0,newb = 0 ;
			
			if( x < 0 ) newa = suma*3;
			else newa = aarray[x]*2 + (suma - aarray[x])*3;
			
			if( y < 0 ) newb = sumb*3;
			else newb = barray[y]*2 + (sumb - barray[y])*3;
			
			//System.out.println( " " + newa + ":" + newb );
			if( newa - newb >  dif ){
				ansa = newa;
				ansb = newb ;
				dif = newa - newb;
			}
		}
		
		System.out.println( ansa +":" +ansb );
	}
	
	static class node implements Comparable<node>
	{
		
		long distance;
		long count;
		
		node( long d , long c ){
			distance = d;
			count = c;
		}
		
		
		public int compareTo( node n){
			
			if( distance < n.distance ) return -1;
			else if( distance > n.distance ) return +1;
			else return 0 ; 
		}
		
		
	}
		
	


static class MyScanner {
	      BufferedReader br;
	      StringTokenizer st;
	 
	      public MyScanner() {
				br = new BufferedReader( new InputStreamReader(System.in) ,8*1024);
	      }
	 
	      String next() {
	          while (st == null || !st.hasMoreElements()) {
	              try {
	                  st = new StringTokenizer(br.readLine());
	              } catch (IOException e) {
	                  e.printStackTrace();
	              }
	          }
	          return st.nextToken();
	      }
	 
	      int nextInt() {
	          return Integer.parseInt(next());
	      }
	 
	      long nextLong() {
	          return Long.parseLong(next());
	      }
	 
	      double nextDouble() {
	          return Double.parseDouble(next());
	      }
	 
	      String nextLine(){
	          String str = "";
		  try {
		     str = br.readLine();
		  } catch (IOException e) {
		     e.printStackTrace();
		  }
		  return str;
	      }

	   }

static class MyWriter 
{
	    BufferedWriter bw;

	    public  MyWriter() {
	       bw = new BufferedWriter(new OutputStreamWriter(System.out),8*1024);
	    }

	    void print(String s)
	    {
	    	try {
				bw.write( s , 0 , s.length() );
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
	    }
	    
	    void println(String s)
	    {
	    	try {
				bw.write( s , 0 , s.length() );
				bw.newLine();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
	    }

	 void close()
	 {
		 try {
			bw.close();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	 }
	}

}