You are given three multisets of pairs of colored sticks: 

  * R pairs of red sticks, the first pair has length r_1, the second pair has length r_2, ..., the R-th pair has length r_R; 
  * G pairs of green sticks, the first pair has length g_1, the second pair has length g_2, ..., the G-th pair has length g_G; 
  * B pairs of blue sticks, the first pair has length b_1, the second pair has length b_2, ..., the B-th pair has length b_B; 



You are constructing rectangles from these pairs of sticks with the following process: 

  1. take a pair of sticks of one color; 
  2. take a pair of sticks of another color different from the first one; 
  3. add the area of the resulting rectangle to the total area. 



Thus, you get such rectangles that their opposite sides are the same color and their adjacent sides are not the same color.

Each pair of sticks can be used at most once, some pairs can be left unused. You are not allowed to split a pair into independent sticks.

What is the maximum area you can achieve?

Input

The first line contains three integers R, G, B (1 ≤ R, G, B ≤ 200) — the number of pairs of red sticks, the number of pairs of green sticks and the number of pairs of blue sticks.

The second line contains R integers r_1, r_2, ..., r_R (1 ≤ r_i ≤ 2000) — the lengths of sticks in each pair of red sticks.

The third line contains G integers g_1, g_2, ..., g_G (1 ≤ g_i ≤ 2000) — the lengths of sticks in each pair of green sticks.

The fourth line contains B integers b_1, b_2, ..., b_B (1 ≤ b_i ≤ 2000) — the lengths of sticks in each pair of blue sticks.

Output

Print the maximum possible total area of the constructed rectangles.

Examples

Input


1 1 1
3
5
4


Output


20


Input


2 1 3
9 5
1
2 8 5


Output


99


Input


10 1 1
11 7 20 15 19 14 2 4 13 14
8
11


Output


372

Note

In the first example you can construct one of these rectangles: red and green with sides 3 and 5, red and blue with sides 3 and 4 and green and blue with sides 5 and 4. The best area of them is 4 × 5 = 20.

In the second example the best rectangles are: red/blue 9 × 8, red/blue 5 × 5, green/blue 2 × 1. So the total area is 72 + 25 + 2 = 99.

In the third example the best rectangles are: red/green 19 × 8 and red/blue 20 × 11. The total area is 152 + 220 = 372. Note that you can't construct more rectangles because you are not allowed to have both pairs taken to be the same color.
import java.util.*;
import java.io.*;  

public class Solution{
    public static class pair{
        int x;
        int y;
    }
    public static class dpair{
        int x;
        int y;
        int z;
    }
    public static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");
        public String next() {
			while (st == null || !st.hasMoreElements())
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}
		public int nextInt() {
			return Integer.parseInt(next());
		}
		public long nextLong() {
			return Long.parseLong(next());
		}
		public Integer[] readArray(int n) {
			Integer[] a=new Integer[n];
			for (int i=0; i<n; i++) {
				a[i]=nextInt();
			}
			return a;
		}public double nextDouble() {
			return Double.parseDouble(next());
		}
    }
    public static void printarr(int[] arr){
        for(int i=0;i<arr.length;i++){
            System.out.print(arr[i]+" ");
        }
        System.out.println();
    }
    static Integer[] ra;
    static Integer[] ga;
    static Integer[] ba;
    static HashMap<Long,Integer> map;
    public static void main(String[] args) throws IOException{
        FastScanner fs=new FastScanner();
		int t=1;//fs.nextInt();
		PrintWriter out=new PrintWriter(System.out);
		while(t-->0){
		    int r=fs.nextInt();
		    int g=fs.nextInt();
		    int b=fs.nextInt();
		    ra=fs.readArray(r);
		    ga=fs.readArray(g);
		    ba=fs.readArray(b);
		    Arrays.sort(ra,Collections.reverseOrder());
		    Arrays.sort(ga,Collections.reverseOrder());
		    Arrays.sort(ba,Collections.reverseOrder());
		    long[][][] dp=new long[r+1][g+1][b+1];
		    for(long[][] a:dp){
		        for(long[] z:a){
		            Arrays.fill(z,-1);
		        }
		    }
		    long ans=dp(dp,0,0,0);
		    System.out.println(ans);
		}
        out.close();
    }
    static long dp(long[][][] dp,int in,int jn,int kn){
        if(dp[in][jn][kn]!=-1){
            return dp[in][jn][kn];
        }
        long ans=0;
        if(in<ra.length&&jn<ga.length){
            ans=Math.max(ans,ra[in]*ga[jn]+dp(dp,in+1,jn+1,kn));
        }
        
        if(in<ra.length&&kn<ba.length){
            ans=Math.max(ans,ra[in]*ba[kn]+dp(dp,in+1,jn,kn+1));
        }
        
        if(kn<ba.length&&jn<ga.length){
            ans=Math.max(ans,ba[kn]*ga[jn]+dp(dp,in,jn+1,kn+1));
        }
        dp[in][jn][kn]=ans;
        return ans;
    }
    static long fost1(dpair[] arr,pair[] a,pair[] b){
        // for(int i=0;i<arr.length;i++){
        //     // System.out.println(arr[i].x+" "+arr[i].y+" "+arr[i].z);
        // }
        long max=Long.MIN_VALUE;
        int[] m=new int[arr.length];
        m[0]=arr[0].y;
        for(int i=1;i<arr.length;i++){
            m[i]=Math.max(arr[i].y,m[i-1]);
            // System.out.println(m[i]);
        }
        long[] sum=new long[arr.length];
        sum[0]=(long)arr[0].z;
        for(int i=1;i<arr.length;i++){
            sum[i]=(long)arr[i].z+sum[i-1];
            // System.out.println(sum[i]);
        }
        int in=0;
        int ip1=0;
        int ip2=0;
        for(int i=0;i<arr.length;i++){
            int p1=0;
            int p2=0;
            int l=0;
            int r=a.length;
            while(l<r){
                int mid=(l+r)/2;
                if(a[mid].x<=arr[i].x){
                    l=mid+1;
                }else{
                    r=mid;
                }
            }
            while(l<a.length&&a[l].x==arr[i].x){
                l++;
            }
            if(l>=a.length){
                break;
            }
            p1=l;
            l=0;
            r=b.length;
            while(l<r){
                int mid=(l+r)/2;
                if(b[mid].x<=m[i]){
                    l=mid+1;
                }else{
                    r=mid;
                }
            }
            // System.out.println(l);
            while(l<b.length&&b[l].x==m[i]){
                l++;
            }
            if(l>=b.length){
                break;
            }
            p2=l;
            // System.out.println(p1+" "+p2);
            if(max<sum[i]-(long)a[p1].y-(long)b[p2].y){
                max=sum[i]-(long)a[p1].y-(long)b[p2].y;
                in=i;
                ip1=p1;
                ip2=p2;
            }
        }
        System.out.println(in+" "+ip1+" "+ip2);
        return max;
    }
    static long fost2(dpair[] arr,pair[] a,pair[] b){
        long max=Long.MIN_VALUE;
        int[] m=new int[arr.length];
        m[0]=arr[0].x;
        for(int i=1;i<arr.length;i++){
            m[i]=Math.max(arr[i].x,m[i-1]);
        }
        long[] sum=new long[arr.length];
        sum[0]=arr[0].z;
        for(int i=1;i<arr.length;i++){
            sum[i]=(long)arr[i].z+sum[i-1];
        }
        for(int i=0;i<arr.length;i++){
            int p1=0;
            int p2=0;
            int l=0;
            int r=b.length;
            while(l<r){
                int mid=(l+r)/2;
                if(b[mid].x<=arr[i].y){
                    l=mid+1;
                }else{
                    r=mid;
                }
            }
            while(l<b.length&&b[l].x==arr[i].y){
                l++;
            }
            if(l>=b.length){
                break;
            }
            p1=l;
            l=0;
            r=a.length;
            while(l<r){
                int mid=(l+r)/2;
                if(a[mid].x<=m[i]){
                    l=mid+1;
                }else{
                    r=mid;
                }
            }
            while(l<a.length&&a[l].x==m[i]){
                l++;
            }
            if(l>=a.length){
                break;
            }
            p2=l;
            max=Math.max(max,sum[i]-(long)b[p1].y-(long)a[p2].y);
        }
        // System.out.println(max);
        return max;
    }
    static long maxSubArraySum(int a[]) 
    { 
        int size = a.length; 
        long max_so_far = Long.MIN_VALUE, max_ending_here = 0; 
        int max=Integer.MIN_VALUE;
        for (int i = 0; i < size; i++) 
        { 
            max_ending_here = max_ending_here + a[i]; 
            if (max_so_far < max_ending_here) 
                max_so_far = max_ending_here; 
            if (max_ending_here < 0) 
                max_ending_here = 0; 
            max=Math.max(max,a[i]);
        } 
        if(max<0){
            return (long)0;
        }
        return max_so_far; 
    } 
    public static class Comp implements Comparator<pair>{
        public int compare(pair a,pair b){
            return a.x-b.x;
        }
    }
    public static class Comp1 implements Comparator<dpair>{
        public int compare(dpair a,dpair b){
            return a.x-b.x;
        }
    }
    public static class Comp2 implements Comparator<dpair>{
        public int compare(dpair a,dpair b){
            return a.y-b.y;
        }
    }
    public static long gcd(long a,long b){
        if (b == 0) 
        return a; 
        return gcd(b, a % b);
    }
    public static int lcm(int a,int b){
        int x=Math.max(a,b);
        int y=Math.min(a,b);
        long ans=x;
        while(ans%y!=0){
            ans+=x;
        }
        if(ans>Integer.MAX_VALUE){
            return -1;
        }
        return (int)ans;
    }
    public static long fact(int n){
        long ans=1;
        for(int i=1;i<=n;i++){
            ans*=i;
        }
        return ans;
    }
}