#include <bits/stdc++.h>
using namespace std;

#define jjs(i, s, x) for (int i = (s); i < int(x); ++i)
#define jjl(i, x) jjs(i, 0, x)
#define ji(x) jjl(i, x)
#define jj(x) jjl(j, x)
#define jk(x) jjl(k, x)
#define jij(a, b) ji(a) jj(b)
#define jij2d(v) jij((v).size(), (v)[i].size())
#define jjdescent(i, s, e) for (int i = (s)-1; i >= int(e); --i)
#define jjrev(i, s) jjdescent(i, s, 0)
#define foreach(x, C) for (auto& x : (C))
#define LINF ((long long) 1e16)
#define pb push_back
#define mp make_pair


#define rint readInteger
template<typename T>
bool readInteger(T& x)
{
	char c, r = 0, n = 0;
	x = 0;
	while (true)
	{
		c = getchar();
		if (c < 0 && !r)
			return 0;
		else if (c == '-' && !r)
			n = 1;
		else if (c >= '0' && c <= '9')
			x = x * 10 + c - '0', r = 1;
		else if (r)
			break;
	}
	if (n)
		x = -x;
	return 1;
}

template<typename T>
vector<T> readIntegral(int n)
{
	vector<T> ret(n);
	for (int i = 0; i < n; i++)
		readInteger(ret[i]);
	return ret;
}

auto readInts = readIntegral<int>;
auto readLongs = readIntegral<long long>;

template<typename T>
vector<vector<T>> make2d(size_t r, size_t c)
{
	return vector<vector<T>>(r, vector<T>(c));
}

template<typename T>
vector<vector<T>> make2d(size_t r, size_t c, const T& def)
{
	return vector<vector<T>>(r, vector<T>(c, def));
}

template <typename T, T MOD>
struct ModInt
{
	T value;
	ModInt() : value(0)
	{}
	ModInt(T x)
	{
		x %= MOD;
		if (x < 0)
			x += MOD;
		value = x;
	}

public:
	ModInt& operator += (ModInt x)
	{
		value += x.value;
		if (value >= MOD)
			value -= MOD;
		return *this;
	}
	ModInt& operator -= (ModInt x)
	{
		value -= x.value;
		if (value < 0)
			value += MOD;
		return *this;
	}
	ModInt& operator *= (ModInt x)
	{
		value *= x.value;
		value %= MOD;
		return *this;
	}
	ModInt& operator /= (ModInt x)
	{
		x.invert();
		return *this *= x;
	}

	ModInt operator + (ModInt x) const
	{
		ModInt o = *this;
		o += x;
		return o;
	}
	ModInt operator - (ModInt x) const
	{
		ModInt o = *this;
		o -= x;
		return o;
	}
	ModInt operator * (ModInt x) const
	{
		ModInt o = *this;
		o *= x;
		return o;
	}
	ModInt operator / (ModInt x) const
	{
		ModInt o = *this;
		o /= x;
		return o;
	}
	bool operator == (ModInt x) const
	{
		return value == x.value;
	}
	bool operator != (ModInt x) const
	{
		return !(*this == x);
	}

	ModInt operator - () const
	{
		return ModInt(0) - *this;
	}

	ModInt operator ^ (long long x) const
	{
		ModInt ret = 1 % MOD;
		ModInt mul = *this;
		while (x)
		{
			if (x & 1)
				ret *= mul;
			mul *= mul;
			x >>= 1;
		}
		return ret;
	}
	ModInt& operator ^= (long long x)
	{
		return *this = *this ^ x;
	}

private:
	void invert()
	{
		*this ^= MOD-2;
	}
public:
	friend ostream& operator << (ostream& out, const ModInt& x)
	{
		return out << x;
	}
};

template<typename T>
using v2d = vector<vector<T>>;

typedef ModInt<long long, 1000000007> mint;
typedef long long ll;
typedef pair<int, int> PII;
typedef vector<PII> VPII;
typedef vector<int> VI;
typedef v2d<int> VVI;
typedef vector<ll> VLL;
typedef v2d<ll> VVLL;
typedef vector<char> VCH;
typedef v2d<char> VVCH;

/**
 *   Simplex Method (Linear Programming)
 *    m - number of (<=) inequalities
 *    n - number of variables
 *
 *    C - (m+1) by (n+1) array of coeffs:
 *    row 0     - obj fun coeffs
 *    row 1:m   - <= inequalities
 *    col 0:n-1 - inequality coeffs
 *    col n     - inequality RHS
 *    C[0][n] must be 0.
 *
 *    X[n] - result variables
 *    return value - max value of obj fun
 *    (-inf for infeasible, inf for unbounded)
 */
template <size_t MAXEQ, size_t MAXV> struct Simplex {
  typedef long double dd; //change to double if needed
  const dd EPS = 1e-9;
  const dd INF = numeric_limits<dd>::infinity();
  dd mat[MAXEQ][MAXV];
  int basis[MAXEQ], out[MAXV];

  void pivot(int m, int n, int a, int b) {
    for (int r = 0; r <= m; ++r)
      if (r != a) for (int c = 0; c <= n; ++c)
        if (c != b) mat[r][c] -= mat[a][c] * mat[r][b] / mat[a][b];
    for (int c = 0; c <= n; ++c)
      if (c != b) mat[a][c] /= mat[a][b];
    for (int r = 0; r <= m; ++r)
      if (r != a) mat[r][b] /= -mat[a][b];
    mat[a][b] = 1.0 / mat[a][b];
    swap(basis[a], out[b]);
  }

  dd simplex(int m, int n, dd inp[][MAXV], dd X[]) {
    int rr, cc;
    for (int r = 1; r <= m; ++r)
      for (int c = 0; c <= n; ++c)
        mat[r][c] = inp[r][c];
    for (int c = 0; c <= n; ++c)
      mat[0][c] = -inp[0][c];
    for (int r = 0; r <= m; ++r)
      basis[r] = -r;
    for (int c = 0; c <= n; ++c)
      out[c] = c;
    while (true) {
      rr = 1;
      for (int r = 1; r <= m; ++r)
        if (tie(mat[r][n], basis[r]) < tie(mat[rr][n], basis[rr])) rr = r;
      if (mat[rr][n] > -EPS) break;
      cc = 0;
      for (int c = 0; c < n; ++c)
        if (tie(mat[rr][c], out[c]) < tie(mat[rr][cc], out[cc])) cc = c;
      if (mat[rr][cc] > -EPS) return -INF;
      pivot(m, n, rr, cc);
    }
    while (true) {
      cc = 0;
      for (int c = 0; c < n; ++c)
        if (tie(mat[0][c], out[c]) < tie(mat[0][cc], out[cc])) cc = c;
      if (mat[0][cc] > -EPS) break;
      rr = 0;
      for (int r = 1; r <= m; ++r)
        if (mat[r][cc] > EPS
            && (!rr
                || make_pair(mat[r][n] * mat[rr][cc], basis[r])
                    < make_pair(mat[rr][n] * mat[r][cc], basis[rr]))) rr = r;
      if (mat[rr][cc] < EPS) return INF;
      pivot(m, n, rr, cc);
    }
    for (int c = 0; c < n; ++c)
      X[c] = 0;
    for (int r = 1; r <= m; ++r)
      if (basis[r] >= 0) X[basis[r]] = mat[r][n];
    return mat[0][n];
  }
};

const int MX = 50;

using Sim = Simplex<MX, MX>;

Sim::dd C[MX][MX];

int main()
{
	double p[6], q[6];
	ji(6) rint(p[i]);
	ji(6) rint(q[i]);
	ji(6) {
		p[i] /= 100;
		q[i] /= 100;
	}

	int n = 8;
	Sim algo;

	C[0][7] = -1;
	int nxt = 1;
	C[nxt][6] = -1;
	C[nxt][n] = 0;
	++nxt;
	C[nxt][6] = 1;
	C[nxt][n] = 1;
	++nxt;
	ji(6)
	{
		C[nxt][i] = -1;
		C[nxt][6] = p[i];
		++nxt;
		C[nxt][i] = -1;
		C[nxt][6] = -q[i];
		C[nxt][n] = -q[i];
		++nxt;
	}
	ji(6) C[nxt][i] = 1;
	C[nxt][7] = -1;
	++nxt;
	Sim:: dd result[MX];
	auto ans = -algo.simplex(nxt, n, C, result);
	printf("%.10f\n", double(ans));
}


Measured memory_bytes: 256