// Arup Guha
// 12/4/2017
// Solution to 2017 NCPC Problem K: Kayaking Trip

import java.util.*;
import java.io.*;

public class k {

	public static long[] skill;
	public static long[] speed;
	public static long[] kayak;
	public static int n;

	public static void main(String[] args) throws Exception {

		BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer tok = new StringTokenizer(stdin.readLine());
		skill = new long[3];
		speed = new long[3];

		// Read in different skills. n = # of kayaks.
		n = 0;
		for (int i=0; i<3; i++) {
			skill[i] = Integer.parseInt(tok.nextToken());
			n += (int)(skill[i]);
		}
		n = n/2;

		// Read in different speeds.
		tok = new StringTokenizer(stdin.readLine());
		for (int i=0; i<3; i++)
			speed[i] = Integer.parseInt(tok.nextToken());

		// Kayak constants.
		kayak = new long[n];
		tok = new StringTokenizer(stdin.readLine());
		for (int i=0; i<n; i++)
			kayak[i] = Integer.parseInt(tok.nextToken());

		// Helpful for greedy.
		Arrays.sort(kayak);

		System.out.println(solve());
	}

	public static long solve() {

		long low = 1, high = 2*kayak[n-1]*speed[2];

		// Binary search.
		while (low < high) {

			// Go in the middle (ceiling)
			long mid = (low+high+1)/2;

			// Reset bounds.
			if (canDo(mid)) low = mid;
			else			high = mid-1;
		}

		// Ta da!
		return low;
	}

	// Returns true iff we can make each kayak of at least score.
	public static boolean canDo(long score) {

		// We will edit this as we match up people.
		long[] tmpS = Arrays.copyOf(skill, 3);

		boolean[] filled = new boolean[n];
		Arrays.fill(filled, true);

		// Try filling each kayak with slow/slow or slow/medium.
		for (int i=n-1; i>=0; i--) {

			// Two slow kayakers are okay.
			if (tmpS[0] >= 2 && 2*speed[0]*kayak[i] >= score) tmpS[0] -= 2;

			// One slow and one medium.
			else if (tmpS[0] >= 1 && tmpS[1] >= 1 && kayak[i]*(speed[0]+speed[1]) >= score) {
				tmpS[0]--;
				tmpS[1]--;
			}

			// Try M/M first.
			else if (2*speed[1] <= speed[0]+speed[2]) {

				// M/M.
				if (tmpS[1] >= 2 && 2*speed[1]*kayak[i] >= score)
					tmpS[1] -= 2;

				// S/F
				else if (tmpS[0] >= 1 && tmpS[2] >= 1 && (speed[0]+speed[2])*kayak[i] >= score) {
					tmpS[0]--;
					tmpS[2]--;
				}

				// M/F
				else if (tmpS[1] >= 1 && tmpS[2] >= 1 && (speed[1]+speed[2])*kayak[i] >= score) {
					tmpS[1]--;
					tmpS[2]--;
				}

				// F/F
				else if (tmpS[2] >= 2 && 2*speed[2]*kayak[i] >= score)
					tmpS[2]-=2;

				// Can't do it!
				else
					return false;
			}

			// Try S/F first.
			else {

				// S/F
				if (tmpS[0] >= 1 && tmpS[2] >= 1 && (speed[0]+speed[2])*kayak[i] >= score) {
					tmpS[0]--;
					tmpS[2]--;
				}

				// M/M
				else if (tmpS[1] >= 2 && 2*speed[1]*kayak[i] >= score)
					tmpS[1] -= 2;

				// M/F
				else if (tmpS[1] >= 1 && tmpS[2] >= 1 && (speed[1]+speed[2])*kayak[i] >= score) {
					tmpS[1]--;
					tmpS[2]--;
				}

				// F/F
				else if (tmpS[2] >= 2 && 2*speed[2]*kayak[i] >= score)
					tmpS[2]-=2;

				// Can't do it.
				else
					return false;
			}
		} // End for i.


		// If we get here, it worked.
		return true;
	}
}
