//

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Threading;
using System.Diagnostics;
using System.Globalization;
using System.Text.RegularExpressions;
using System.Linq;

namespace sar_cs
{
    static class Helpers
    {
        public static string Join<T>(this IEnumerable<T> objs, string sep)
        {
            var sb = new StringBuilder();
            foreach (var s in objs) { if (sb.Length != 0) sb.Append(sep); sb.Append(s); }
            return sb.ToString();
        }

        public static string AsString(this double a, int digits)
        {
            return a.ToString("F" + digits, CultureInfo.InvariantCulture);
        }

        public static Stopwatch SW = Stopwatch.StartNew();
    }

    public class Program
    {
        #region Helpers

        public class Parser
        {
            const int BufSize = 8000;
            TextReader s;
            char[] buf = new char[BufSize];
            int bufPos;
            int bufDataSize;
            bool eos;   // eos read to buffer
            int lastChar = -2;
            int nextChar = -2;
            StringBuilder sb = new StringBuilder();

            void FillBuf()
            {
                if (eos) return;
                bufDataSize = s.Read(buf, 0, BufSize);
                if (bufDataSize == 0) eos = true;
                bufPos = 0;
            }

            int Read()
            {
                if (nextChar != -2)
                {
                    lastChar = nextChar;
                    nextChar = -2;
                }
                else
                {
                    if (bufPos == bufDataSize) FillBuf();
                    if (eos) lastChar = -1;
                    else lastChar = buf[bufPos++];
                }
                return lastChar;
            }

            void Back()
            {
                if (lastChar == -2) throw new Exception();  // no chars were ever read
                nextChar = lastChar;
            }

            public Parser()
            {
                s = Console.In;
            }

            public int ReadInt()
            {
                int res = 0;
                int sign = -1;
                int c;
                do { c = Read(); } while (c >= 0 && char.IsWhiteSpace((char)c));
                if (c == '-') { sign = 1; c = Read(); }
                int len = 0;
                while (c >= 0 && !char.IsWhiteSpace((char)c))
                {
                    if ((uint)(c -= 48) >= 10) throw new FormatException();
                    len++;
                    res = checked(res * 10 - c);
                    c = Read();
                }
                if (len == 0) throw new FormatException();
                Back();
                return checked(res * sign);
            }

            public long ReadLong()
            {
                long res = 0;
                int sign = -1;
                int c;
                do { c = Read(); } while (c >= 0 && char.IsWhiteSpace((char)c));
                if (c == '-')
                {
                    sign = 1;
                    c = Read();
                }
                int len = 0;

                while (c >= 0 && !char.IsWhiteSpace((char)c))
                {
                    if ((uint)(c -= 48) >= 10) throw new FormatException();
                    len++;
                    res = checked(res * 10 - c);
                    c = Read();
                }
                if (len == 0) throw new FormatException();
                Back();
                return checked(res * sign);
            }

            public int ReadLnInt()
            {
                int res = ReadInt(); ReadLine(); return res;
            }

            public long ReadLnLong()
            {
                long res = ReadLong(); ReadLine(); return res;
            }

            public double ReadDouble()
            {
                int c;
                do { c = Read(); } while (c >= 0 && char.IsWhiteSpace((char)c));

                int sign = 1;
                if (c == '-') { sign = -1; c = Read(); }

                sb.Length = 0;
                while (c >= 0 && !char.IsWhiteSpace((char)c))
                {
                    sb.Append((char)c); c = Read();
                }

                Back();
                var res = double.Parse(sb.ToString(), CultureInfo.InvariantCulture);
                return res * sign;
            }

            public string ReadLine()
            {
                int c = Read();
                sb.Length = 0;
                while (c != -1 && c != 13 && c != 10)
                {
                    sb.Append((char)c); c = Read();
                }
                if (c == 13) { c = Read(); if (c != 10) Back(); }
                return sb.ToString();
            }

            public bool SeekEOF
            {
                get
                {
                L0:
                    int c = Read();
                    if (c == -1) return true;
                    if (char.IsWhiteSpace((char)c)) goto L0;
                    Back();
                    return false;
                }
            }

            public int[] ReadIntArr(int n)
            {
                var a = new int[n]; for (int i = 0; i < n; i++) a[i] = ReadInt(); return a;
            }

            public long[] ReadLongArr(int n)
            {
                var a = new long[n]; for (int i = 0; i < n; i++) a[i] = ReadLong(); return a;
            }
        }

        static void pe() { Console.WriteLine("???"); Environment.Exit(0); }
        static void re() { Environment.Exit(55); }
        static void Swap<T>(ref T a, ref T b) { T t = a; a = b; b = t; }
        static int Sqr(int a) { return a * a; }
        static long SqrL(int a) { return (long)a * a; }
        static long Sqr(long a) { return a * a; }
        static double Sqr(double a) { return a * a; }

        static StringBuilder sb = new StringBuilder();
        static Random rand = new Random(5);

        #endregion Helpers

        static void Main(string[] args)
        {
            checked
            {
                //Console.SetIn(File.OpenText("_input"));
                var parser = new Parser();
                while (!parser.SeekEOF)
                {
                    int n = parser.ReadInt();
                    var r1_arr = parser.ReadIntArr(n);
                    n = parser.ReadInt();
                    var p1_arr = parser.ReadIntArr(n);
                    n = parser.ReadInt();
                    var p2_arr = parser.ReadIntArr(n);
                    int A = parser.ReadInt();
                    int B = parser.ReadInt();

                    //var r2 = B * 2 * Sqr(3) * 1.0 / (A * 1 + B * 2);
                    //r2 = Math.Sqrt(r2);

                    var r1 = (double)r1_arr.Max();

                    double best = double.MinValue;
                    foreach (var p1 in p1_arr)
                        foreach (var p2 in p2_arr)
                        {
                            var r2 = (double)p1 / ((double)A * p2 + (double)B * p1);
                            best = Math.Max(best, r2);
                        }

                    var result = r1 * Math.Sqrt(best * B);
                    Console.WriteLine(result.AsString(8));
                }
            }
        }

        //static void Main(string[] args)
        //{
        //    new Thread(Main2, 50 << 20).Start();
        //}
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Collections;
using System.Diagnostics;
using System.Globalization;
using System.Threading;

namespace CodeForces {
    struct Node {
        public int X, Y, D;
        public Node(int x,int y, int d) {
            X = x;
            Y = y;
            D = d;
        }
    }

    class Pair : IComparable<Pair> {
        public int Vertex, Danger;
        public Pair(int f, int s) {
            Vertex = f;
            Danger = s;
        }

        public int CompareTo(Pair other) {
            return Vertex.CompareTo(Danger);
        }
    }

    class Desc : IComparer<int> {
        public int Compare(int x, int y) {
            return y.CompareTo(x);
        }
    }

    class Cf {
        static TextReader input;
        static void Main(string[] args) {
#if TESTS
            Stopwatch sw = new Stopwatch();
            sw.Start();
            input = new StreamReader("input.txt");
#else
            input = Console.In;
#endif
            Solve();
#if TESTS
            Console.WriteLine();
            Console.WriteLine("Milliseconds: {0}", sw.ElapsedMilliseconds);
            Console.ReadLine();
#endif
        }

        const int MOD = 1000000007;
        static int n, m;
        static void Solve() {
            n = nextPositive();
            int[] x = new int[n];
            for (int i = 0; i < n; i++) {
                x[i] = nextPositive();
            }
            m = nextPositive();
            int[] y = new int[m];
            for (int i = 0; i < m; i++) {
                y[i] = nextPositive();
            }
            int k = nextPositive();
            int[] z = new int[k];
            for (int i = 0; i < k; i++) {
                z[i] = nextPositive();
            }
            int a = nextPositive();
            int b = nextPositive();
            double r1 = x.Max();
            double p1 = y.Max();
            double p2 = z.Min();
            double aa = (double)a;
            double bb = (double)b;
            double r2 = r1 * Math.Sqrt(bb / (bb + aa * p2 / p1));
            Console.WriteLine(r2.ToString().Replace(',','.'));
        }

        #region math
        static long gcd(long a, long b) {
            return b != 0 ? gcd(b, a % b) : a;
        }

        static long lcm(long a, long b) {
            return a / gcd(a, b) * b;
        }

        //static int SquaredDistanceBetweenSegments(int x1, int y1, int x2, int y2, int xx1, int yy1, int xx2, int yy2) {
        //    return Math.Min(Math.Min(SquaredDistanceToSegment(x1, y1, xx1, yy1, xx2, yy2), SquaredDistanceToSegment(x2, y2, xx1, yy1, xx2, yy2)),
        //        Math.Min(SquaredDistanceToSegment(xx1, yy1, x1, y1, x2, y2), SquaredDistanceToSegment(xx2, yy2, x1, y1, x2, y2)));
        //}

        //static int SquaredDistanceToSegment(int x, int y, int x1, int y1, int x2, int y2) {
        //    int result = Math.Min(SquaredDistance(x, y, x1, y1), SquaredDistance(x, y, x2, y2));
        //    if (x1 == x2 && y1 <= y && y <= y2)
        //        result = (x - x1) * (x - x1);
        //    else if (y1 == y2 && x1 <= x && x <= x2)
        //        result = (y - y1) * (y - y1);
        //    return result;
        //}

        static long SquaredDistance(long ax, long ay, long bx, long by) {
            return (ax - bx) * (ax - bx) + (ay - by) * (ay - by);
        }
        #endregion

        #region read helpers
        static int nextPositive() {
            int t = input.Read();
            while (t < '0' || t > '9') t = input.Read();
            int x = 0;
            while (t >= '0' && t <= '9') {
                x *= 10;
                x += t - '0';
                t = input.Read();
            }
            return x;
        }

        static int nextInt() {
            int t = input.Read();
            while ((t < '0' || t > '9') && t != '-') t = input.Read();
            int sign = 1;
            if (t == '-') {
                sign = -1;
                t = input.Read();
            }
            int x = 0;
            while (t >= '0' && t <= '9') {
                x *= 10;
                x += t - '0';
                t = input.Read();
            }
            return x * sign;
        }

        static long nextLong() {
            int t = input.Read();
            while (t < '0' || t > '9') t = input.Read();
            long x = 0;
            while (t >= '0' && t <= '9') {
                x *= 10;
                x += t - '0';
                t = input.Read();
            }
            return x;
        }

        public static List<int> ReadIntList() {
            return input.ReadLine().Split(' ').Select(x => int.Parse(x)).ToList();
        }

        public static int[] ReadIntArray() {
            return input.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
        }

        public static double[] ReadDoubleArray() {
            return input.ReadLine().Split(' ').Select(x => double.Parse(x)).ToArray();
        }

        public static long[] ReadLongArray() {
            return input.ReadLine().Split(' ').Select(x => long.Parse(x)).ToArray();
        }

        public static List<long> ReadLongList() {
            return input.ReadLine().Split(' ').Select(x => long.Parse(x)).ToList();
        }

        public static string ReadLine() {
            return input.ReadLine();
        }

        public static int ReadInt() {
            return int.Parse(input.ReadLine());
        }

        public static long ReadLong() {
            return long.Parse(input.ReadLine());
        }
#endregion
    }

    public class SegmentTree {
        private int[] a, t;
        private int n;
        public SegmentTree(int[] a) {
            n = a.Length;
            this.a = a;
            t = new int[n << 2];
            buildSegmentTree(0, n - 1, 1);
        }

        private void buildSegmentTree(int l, int r, int v) {
            if (l == r)
                t[v] = a[l];
            else {
                int m = (l + r) >> 1;
                int vl = v << 1;
                int vr = (v << 1) | 1;
                buildSegmentTree(l, m, vl);
                buildSegmentTree(m + 1, r, vr);
                t[v] = t[vl] + t[vr];
            }
        }

        public int QuerySegmentTree(int l, int r) {
            return querySegmentTree(1, l, r, 0, n - 1);
        }

        public void Update(int v, int tl, int tr, int pos, int new_val) {
            if (tl == tr)
                t[v] = new_val;
            else {
                int tm = (tl + tr) / 2;
                if (pos <= tm)
                    Update(v << 1, tl, tm, pos, new_val);
                else
                    Update(v << 1 + 1, tm + 1, tr, pos, new_val);
                t[v] = t[v << 1] + t[v << 1 + 1];
            }
        }

        private int querySegmentTree(int v, int l, int r, int tl, int tr) {
            if (l > r)
                return 0;
            if (l == tl && r == tr)
                return t[v];
            int m = (tl + tr) >> 1;
            return querySegmentTree(v << 1, l, Math.Min(r, m), tl, m) + querySegmentTree((v << 1) | 1, Math.Max(l, m + 1), r, m + 1, tr);
        }
    }
    class Graph : List<List<int>> {
        public Graph(int num): base(num) {
            for (int i = 0; i < num; i++) {
                this.Add(new List<int>());
            }
        }
    }

    public static class Extensions {
        public static void Shuffle<T>(this IList<T> arr) {
            Random rnd = new Random();
            int c = arr.Count;
            for (int i = 0; i < arr.Count; i++) {
                int t = rnd.Next(c);
                T temp = arr[i];
                arr[i] = arr[c];
                arr[c] = temp;
            }
        }

        public static int Max(this int a, int b) {
            return Math.Max(a, b);
        }

        public static int Min(this int a, int b) {
            return Math.Min(a, b);
        }

        public static void Fill(this int[] array, int val) {
            for (int i = 0; i < array.Length; i++) {
                array[i] = val;
            }
        }

        public static void Fill(this double[] array, double val) {
            for (int i = 0; i < array.Length; i++) {
                array[i] = val;
            }
        }

        public static int ToInt(this string s) {
            return int.Parse(s);
        }

        public static string Fill(this char c, int count) {
            char[] r = new char[count];
            for (int i = 0; i < count; ++i)
                r[i] = c;
            return new string(r);
        }

        public static void Print<T>(this IEnumerable<T> arr) {
            foreach (T t in arr)
                Console.Write("{0} ", t);
        }
    }
}


using System;
using System.Globalization;
using System.Linq;

namespace OlympicMedal
{
    internal class Program
    {
        private static int n;

        private static int[] x;

        private static int m;

        private static int[] y;

        private static int k;

        private static int[] z;

        private static int a;

        private static int b;

        private static void Main(string[] args)
        {
            x = Console.ReadLine().Split(' ').Select(s => Convert.ToInt32(s)).ToArray();
            n = x[0];
            y = Console.ReadLine().Split(' ').Select(s => Convert.ToInt32(s)).ToArray();
            m = y[0];
            z = Console.ReadLine().Split(' ').Select(s => Convert.ToInt32(s)).ToArray();
            k = z[0];
            int[] values = Console.ReadLine().Split(' ').Select(s => Convert.ToInt32(s)).ToArray();
            a = values[0];
            b = values[1];

            double result = Solve();
            Console.Out.WriteLine(String.Format(CultureInfo.InvariantCulture, "{0:0.00000000}", result));
        }

        private static double Solve()
        {
            // max r1
            double r1 = Double.MinValue;
            for (int i = 1; i <= n; i++)
            {
                if (x[i] > r1)
                {
                    r1 = x[i];
                }
            }

            // max p1
            double p1 = Double.MinValue;
            for (int i = 1; i <= m; i++)
            {
                if (y[i] > p1)
                {
                    p1 = y[i];
                }
            }

            // min p2
            double p2 = Double.MaxValue;
            for (int i = 1; i <= k; i++)
            {
                if (z[i] < p2)
                {
                    p2 = z[i];
                }
            }

//            Console.Out.WriteLine("r1 = {0}, p1 = {1}, p2 = {2}", r1, p1, p2);
            double r2Sqr = (0.0 + p1) * r1 * r1 / (p1 + (0.0 + a) / b * p2);
            return Math.Sqrt(r2Sqr);
        }
    }
}


using System;
using System.Linq;

namespace B
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            int[] xs =
                Console.ReadLine().Split(new[] {" "}, StringSplitOptions.RemoveEmptyEntries).Skip(1).Select(
                    x => Int32.Parse(x)).OrderByDescending(x => x).ToArray();
            int[] ys =
                Console.ReadLine().Split(new[] {" "}, StringSplitOptions.RemoveEmptyEntries).Skip(1).Select(
                    x => Int32.Parse(x)).ToArray();
            int[] zs =
                Console.ReadLine().Split(new[] {" "}, StringSplitOptions.RemoveEmptyEntries).Skip(1).Select(
                    x => Int32.Parse(x)).ToArray();

            var ab = Console.ReadLine().Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries).Select(
                    x => Int32.Parse(x)).ToArray();

            double a = ab[0];
            double b = ab[1];

            double rout = xs.Max();
            double pout = (a > b ? ys.Max() : ys.Min());
            double pin = zs.Min();

            //var xsp = new[] {xs.Min(), xs.Max()};
            //var ysp = new[] {ys.Min(), ys.Max()};
            //var zsp = new[] {zs.Min(), zs.Max()};

            var max = (from r1 in xs from p1 in ys from p2 in zs select rout*Math.Sqrt(b*pout/(b*pout + a*pin))).Max();

            Console.WriteLine(max);
        }
    }
}


using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;

namespace B
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            int[] xs =
                Console.ReadLine().Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries).Skip(1).Select(
                    x => Int32.Parse(x)).ToArray();
            int[] ys =
                Console.ReadLine().Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries).Skip(1).Select(
                    x => Int32.Parse(x)).ToArray();
            int[] zs =
                Console.ReadLine().Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries).Skip(1).Select(
                    x => Int32.Parse(x)).ToArray();

            var ab = Console.ReadLine().Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries).Select(
                    x => Int32.Parse(x)).ToArray();

            double a = ab[0];
            double b = ab[1];

            double rout = xs.Max();
            double pout = ys.Max();
            double pin = zs.Min();

            var res = rout * Math.Sqrt(b * pout / (b * pout + a * pin));

            Console.WriteLine(res.ToString(CultureInfo.InvariantCulture));
        }
    }
}


using System;
using System.Linq;

namespace B
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            int[] xs =
                Console.ReadLine().Split(new[] {" "}, StringSplitOptions.RemoveEmptyEntries).Skip(1).Select(
                    x => Int32.Parse(x)).OrderByDescending(x => x).ToArray();
            int[] ys =
                Console.ReadLine().Split(new[] {" "}, StringSplitOptions.RemoveEmptyEntries).Skip(1).Select(
                    x => Int32.Parse(x)).ToArray();
            int[] zs =
                Console.ReadLine().Split(new[] {" "}, StringSplitOptions.RemoveEmptyEntries).Skip(1).Select(
                    x => Int32.Parse(x)).ToArray();

            var ab = Console.ReadLine().Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries).Select(
                    x => Int32.Parse(x)).ToArray();

            double a = ab[0];
            double b = ab[1];

            double rout = xs.Max();
            double pout = (a > b ? ys.Max() : ys.Min());
            double pin = zs.Min();

            //var xsp = new[] { xs.Min(), xs.Max() };
            //var ysp = new[] { ys.Min(), ys.Max() };
            //var zsp = new[] { zs.Min(), zs.Max() };

            var max = (from r1 in xs from p1 in ys from p2 in zs select r1*Math.Sqrt(b*p1/(b*p1 + a*p2))).Max();

            Console.WriteLine(max);
        }
    }
}


using System;
using System.Linq;

namespace B
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            int[] xs =
                Console.ReadLine().Split(new[] {" "}, StringSplitOptions.RemoveEmptyEntries).Skip(1).Select(
                    x => Int32.Parse(x)).OrderByDescending(x => x).ToArray();
            int[] ys =
                Console.ReadLine().Split(new[] {" "}, StringSplitOptions.RemoveEmptyEntries).Skip(1).Select(
                    x => Int32.Parse(x)).ToArray();
            int[] zs =
                Console.ReadLine().Split(new[] {" "}, StringSplitOptions.RemoveEmptyEntries).Skip(1).Select(
                    x => Int32.Parse(x)).ToArray();

            var ab = Console.ReadLine().Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries).Select(
                    x => Int32.Parse(x)).ToArray();

            double a = ab[0];
            double b = ab[1];

            double rout = xs.Max();
            double pout = (a > b ? ys.Max() : ys.Min());
            double pin = zs.Min();

            var xsp = new[] { xs.Min(), xs.Max() };
            var ysp = new[] { ys.Min(), ys.Max() };
            var zsp = new[] { zs.Min(), zs.Max() };

            var max = (from r1 in xsp from p1 in ysp from p2 in zsp select r1*Math.Sqrt(b*p1/(b*p1 + a*p2))).Max();

            Console.WriteLine(max);
        }
    }
}


using System;
using System.Linq;

namespace B
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            int[] xs =
                Console.ReadLine().Split(new[] {" "}, StringSplitOptions.RemoveEmptyEntries).Skip(1).Select(
                    x => Int32.Parse(x)).OrderByDescending(x => x).ToArray();
            int[] ys =
                Console.ReadLine().Split(new[] {" "}, StringSplitOptions.RemoveEmptyEntries).Skip(1).Select(
                    x => Int32.Parse(x)).ToArray();
            int[] zs =
                Console.ReadLine().Split(new[] {" "}, StringSplitOptions.RemoveEmptyEntries).Skip(1).Select(
                    x => Int32.Parse(x)).ToArray();

            var ab = Console.ReadLine().Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries).Select(
                    x => Int32.Parse(x)).ToArray();

            double a = ab[0];
            double b = ab[1];

            double rout = xs.Max();
            double pout = (a > b ? ys.Max() : ys.Min());
            double pin = zs.Min();

            //var xsp = new[] { xs.Min(), xs.Max() };
            //var ysp = new[] { ys.Min(), ys.Max() };
            //var zsp = new[] { zs.Min(), zs.Max() };

            var max = (from r1 in xs from p1 in ys from p2 in zs select r1*Math.Sqrt(b*p1/(b*p1 + a*p2))).Max();

            Console.Write(max);
        }
    }
}


using System;
using System.Linq;

namespace B
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            int[] xs =
                Console.ReadLine().Split(new[] {" "}, StringSplitOptions.RemoveEmptyEntries).Skip(1).Select(
                    x => Int32.Parse(x)).ToArray();
            int[] ys =
                Console.ReadLine().Split(new[] {" "}, StringSplitOptions.RemoveEmptyEntries).Skip(1).Select(
                    x => Int32.Parse(x)).ToArray();
            int[] zs =
                Console.ReadLine().Split(new[] {" "}, StringSplitOptions.RemoveEmptyEntries).Skip(1).Select(
                    x => Int32.Parse(x)).ToArray();

            var ab = Console.ReadLine().Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries).Select(
                    x => Int32.Parse(x)).ToArray();

            double a = ab[0];
            double b = ab[1];

            double rout = xs.Max();
            double pout = ys.Max();
            double pin = zs.Min();

            var res = rout * Math.Sqrt(b * pout / (b * pout + a * pin));

            Console.WriteLine(res);
        }
    }
}


using System;
using System.Linq;

namespace B
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            int[] xs =
                Console.ReadLine().Split(new[] {" "}, StringSplitOptions.RemoveEmptyEntries).Skip(1).Select(
                    x => Int32.Parse(x)).OrderByDescending(x => x).ToArray();
            int[] ys =
                Console.ReadLine().Split(new[] {" "}, StringSplitOptions.RemoveEmptyEntries).Skip(1).Select(
                    x => Int32.Parse(x)).ToArray();
            int[] zs =
                Console.ReadLine().Split(new[] {" "}, StringSplitOptions.RemoveEmptyEntries).Skip(1).Select(
                    x => Int32.Parse(x)).ToArray();

            var ab = Console.ReadLine().Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries).Select(
                    x => Int32.Parse(x)).ToArray();

            double a = ab[0];
            double b = ab[1];

            double rout = xs.Max();
            double pout = (a > b ? ys.Max() : ys.Min());
            double pin = zs.Min();

            var xsp = new[] {xs.Min(), xs.Max()};
            var ysp = new[] {ys.Min(), ys.Max()};
            var zsp = new[] {zs.Min(), zs.Max()};

            var max = (from r1 in xsp from p1 in ysp from p2 in zsp select rout*Math.Sqrt(b*pout/(b*pout + a*pin))).Max();

            Console.WriteLine(max);
        }
    }
}


using System;
using System.Linq;

namespace B
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            int[] xs =
                Console.ReadLine().Split(new[] {" "}, StringSplitOptions.RemoveEmptyEntries).Skip(1).Select(
                    x => Int32.Parse(x)).ToArray();
            int[] ys =
                Console.ReadLine().Split(new[] {" "}, StringSplitOptions.RemoveEmptyEntries).Skip(1).Select(
                    x => Int32.Parse(x)).ToArray();
            int[] zs =
                Console.ReadLine().Split(new[] {" "}, StringSplitOptions.RemoveEmptyEntries).Skip(1).Select(
                    x => Int32.Parse(x)).ToArray();

            var ab = Console.ReadLine().Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries).Select(
                    x => Int32.Parse(x)).ToArray();

            double a = ab[0];
            double b = ab[1];

            double rout = xs.Max();
            double pout = (a > b ? ys.Max() : ys.Min());
            double pin = zs.Min();

            var res = rout * Math.Sqrt(b * pout / (b * pout + a * pin));

            Console.WriteLine(res);
        }
    }
}


using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;

namespace B
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            int[] xs =
                Console.ReadLine().Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries).Skip(1).Select(
                    x => Int32.Parse(x)).ToArray();
            int[] ys =
                Console.ReadLine().Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries).Skip(1).Select(
                    x => Int32.Parse(x)).ToArray();
            int[] zs =
                Console.ReadLine().Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries).Skip(1).Select(
                    x => Int32.Parse(x)).ToArray();

            var ab = Console.ReadLine().Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries).Select(
                    x => Int32.Parse(x)).ToArray();

            double a = ab[0];
            double b = ab[1];

            double rout = xs.Max();
            double pout = ys.Max();
            double pin = zs.Min();

            var res = rout * Math.Sqrt(b * pout / (b * pout + a * pin));

            Console.WriteLine("{0:0.00000000}", res);
        }
    }
}


using System;
using System.Linq;

namespace B
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            var xs =
                Console.ReadLine().Split(new[] {" "}, StringSplitOptions.RemoveEmptyEntries).Skip(1).Select(
                    x => Double.Parse(x)).OrderByDescending(x => x).ToArray();
            var ys =
                Console.ReadLine().Split(new[] {" "}, StringSplitOptions.RemoveEmptyEntries).Skip(1).Select(
                    x => Double.Parse(x)).ToArray();
            var zs =
                Console.ReadLine().Split(new[] {" "}, StringSplitOptions.RemoveEmptyEntries).Skip(1).Select(
                    x => Double.Parse(x)).ToArray();

            var ab = Console.ReadLine().Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries).Select(
                    x => Double.Parse(x)).ToArray();

            double a = ab[0];
            double b = ab[1];

            //double r1 = xs.Max();
            //double p1 = (a > b ? ys.Max() : ys.Min());
            //double p2 = zs.Min();

            //var xsp = new[] { xs.Min(), xs.Max() };
            //var ysp = new[] { ys.Min(), ys.Max() };
            //var zsp = new[] { zs.Min(), zs.Max() };

            var k = a/b;
            var max = (from r1 in xs from p1 in ys from p2 in zs select r1*Math.Sqrt(p1/(p1 + k*p2))).Max();

            Console.Write(max);
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CodeForce97
{
	class ClassB
	{
		static void Main(string[] args)
		{
			int r1 = 0;
			string[] ss = Console.ReadLine().Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries);
			int n = int.Parse(ss[0]);
			for (int i = 1; i < n + 1; i++)
			{
				int ii = int.Parse(ss[i]);
				if (ii > r1)
					r1 = ii;
			}
			int p1 = 0;
			ss = Console.ReadLine().Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries);
			int m = int.Parse(ss[0]);
			for (int i = 1; i < m + 1; i++)
			{
				int ii = int.Parse(ss[i]);
				if (ii > p1)
					p1 = ii;
			}
			int p2 = int.MaxValue;
			ss = Console.ReadLine().Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries);
			int k = int.Parse(ss[0]);
			for (int i = 1; i < k + 1; i++)
			{
				int ii = int.Parse(ss[i]);
				if (ii < p2)
					p2 = ii;
			}
			ss = Console.ReadLine().Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries);
			int A = int.Parse(ss[0]);
			int B = int.Parse(ss[1]);

			double ans = Math.Sqrt(p1 * B * r1 * r1 / (double)(p2 * A + p1* B));

			Console.WriteLine(string.Format("{0}", ans).Replace(',','.'));

//					Console.ReadKey();
		}
	}

}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CodeForce97
{
	class ClassB
	{
		static void Main(string[] args)
		{
			int r1 = 0;
			string[] ss = Console.ReadLine().Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries);
			int n = int.Parse(ss[0]);
			for (int i = 1; i < n + 1; i++)
			{
				int ii = int.Parse(ss[i]);
				if (ii > r1)
					r1 = ii;
			}
			int p1 = 0;
			ss = Console.ReadLine().Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries);
			int m = int.Parse(ss[0]);
			for (int i = 1; i < m + 1; i++)
			{
				int ii = int.Parse(ss[i]);
				if (ii > p1)
					p1 = ii;
			}
			int p2 = int.MaxValue;
			ss = Console.ReadLine().Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries);
			int k = int.Parse(ss[0]);
			for (int i = 1; i < k + 1; i++)
			{
				int ii = int.Parse(ss[i]);
				if (ii < p2)
					p2 = ii;
			}
			ss = Console.ReadLine().Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries);
			int A = int.Parse(ss[0]);
			int B = int.Parse(ss[1]);

			double ans = Math.Sqrt((double)(p1 * B) * (double)(r1 * r1) / (double)(p2 * A + p1* B));

			Console.WriteLine(string.Format("{0}", ans).Replace(',','.'));

//					Console.ReadKey();
		}
	}

}


using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;

namespace Temp
{
    struct PointInt
    {
        public long X;

        public long Y;

        public PointInt(long x, long y)
            : this()
        {
            this.X = x;
            this.Y = y;
        }

        public static PointInt operator +(PointInt a, PointInt b)
        {
            return new PointInt(a.X + b.X, a.Y + b.Y);
        }

        public static PointInt operator -(PointInt a, PointInt b)
        {
            return new PointInt(a.X - b.X, a.Y - b.Y);
        }

        public static PointInt operator *(PointInt a, long k)
        {
            return new PointInt(k * a.X, k * a.Y);
        }

        public static PointInt operator *(long k, PointInt a)
        {
            return new PointInt(k * a.X, k * a.Y);
        }

        public bool IsInsideRectangle(long l, long b, long r, long t)
        {
            return (l <= X) && (X <= r) && (b <= Y) && (Y <= t);
        }
    }

    struct LineInt
    {
        public LineInt(PointInt a, PointInt b)
            : this()
        {
            A = a.Y - b.Y;
            B = b.X - a.X;
            C = a.X * b.Y - a.Y * b.X;
        }

        public long A, B, C;

        public bool ContainsPoint(PointInt p)
        {
            return A * p.X + B * p.Y + C == 0;
        }
    }

    class MatrixInt
    {
        private long[,] m_Matrix;

        public int Size
        {
            get
            {
                return m_Matrix.GetLength(0) - 1;
            }
        }

        public long Mod { get; private set; }

        public MatrixInt(int size, long mod = 0)
        {
            m_Matrix = new long[size + 1, size + 1];
            Mod = mod;
        }

        public MatrixInt(long[,] matrix, long mod = 0)
        {
            this.m_Matrix = matrix;
            Mod = mod;
        }

        public static MatrixInt GetIdentityMatrix(int size, long mod = 0)
        {
            long[,] matrix = new long[size + 1, size + 1];

            for (int i = 1; i <= size; i++)
            {
                matrix[i, i] = 1;
            }

            return new MatrixInt(matrix, mod);
        }

        public long this[int i, int j]
        {
            get
            {
                return m_Matrix[i, j];
            }

            set
            {
                m_Matrix[i, j] = value;
            }
        }

        public static MatrixInt operator +(MatrixInt a, MatrixInt b)
        {
            int n = a.Size;
            long mod = Math.Max(a.Mod, b.Mod);
            long[,] c = new long[n, n];
            for (int i = 1; i <= n; i++)
            {
                for (int j = 1; j <= n; j++)
                {
                    c[i, j] = a[i, j] + b[i, j];
                }
            }

            if (mod > 0)
            {
                for (int i = 1; i <= n; i++)
                {
                    for (int j = 1; j <= n; j++)
                    {
                        c[i, j] %= mod;
                    }
                }
            }

            return new MatrixInt(c, mod);
        }

        public static MatrixInt operator *(MatrixInt a, MatrixInt b)
        {
            int n = a.Size;
            long mod = Math.Max(a.Mod, b.Mod);

            long[,] c = new long[n, n];

            for (int i = 1; i <= n; i++)
            {
                for (int j = 1; j <= n; j++)
                {
                    for (int k = 1; k <= n; k++)
                    {
                        c[i, j] += a[i, k] * b[k, j];
                        if (mod > 0)
                        {
                            c[i, j] %= mod;
                        }
                    }
                }
            }

            return new MatrixInt(c, mod);
        }
    }

    static class Algebra
    {
        public static long Phi(long n)
        {
            long result = n;
            for (long i = 2; i * i <= n; i++)
            {
                if (n % i == 0)
                {
                    while (n % i == 0)
                    {
                        n /= i;
                    }

                    result -= result / i;
                }
            }

            if (n > 1)
            {
                result -= result / n;
            }

            return result;
        }

        public static long BinPower(long a, long n, long mod)
        {
            long result = 1;

            while (n > 0)
            {
                if ((n & 1) != 0)
                {
                    result = (result * a) % mod;
                }

                a = (a * a) % mod;
                n >>= 1;
            }

            return result;
        }

        public static class Permutations
        {
            public static int[] GetRandomPermutation(int n)
            {
                int[] p = new int[n];
                for (int i = 0; i < n; i++)
                {
                    p[i] = i;
                }

                Random random = new Random();
                for (int i = n - 1; i > 0; i--)
                {
                    int j = random.Next(i + 1);
                    int tmp = p[i];
                    p[i] = p[j];
                    p[j] = tmp;
                }

                return p;
            }
        }

        public static T[] Shuffle<T>(this T[] array)
        {
            int length = array.Length;
            int[] p = Permutations.GetRandomPermutation(length);
            T[] result = new T[length];
            for (int i = 0; i < length; i++)
            {
                result[i] = array[p[i]];
            }

            return result;
        }

        public static MatrixInt MatrixBinPower(MatrixInt a, long n)
        {
            MatrixInt result = new MatrixInt(a.Size);

            while (n > 0)
            {
                if ((n & 1) != 0)
                {
                    result *= a;
                }

                a *= a;
                n >>= 1;
            }

            return result;
        }

        public static long Gcd(long a, long b)
        {
            return b == 0 ? a : Gcd(b, a % b);
        }

        public static long ExtendedGcd(long a, long b, out long x, out long y)
        {
            if (b == 0)
            {
                x = 1;
                y = 0;
                return a;
            }

            long x1;
            long y1;
            long d = ExtendedGcd(b, a % b, out x1, out y1);
            x = y1;
            y = x1 - (a / b) * y1;
            return d;
        }

        public static long Lcm(long a, long b)
        {
            return (a / Gcd(a, b)) * b;
        }

        public static bool[] GetPrimes(int n)
        {
            n = Math.Max(n, 2);
            bool[] prime = new bool[n + 1];
            for (int i = 2; i <= n; i++)
            {
                prime[i] = true;
            }

            for (int i = 2; i * i <= n; i++)
            {
                if (prime[i])
                {
                    if ((long)i * i <= n)
                    {
                        for (int j = i * i; j <= n; j += i)
                        {
                            prime[j] = false;
                        }
                    }
                }
            }

            return prime;
        }

        public static long GetFibonacciNumber(long n, long mod = 0)
        {
            long[,] matrix = new long[,] { { 0, 0, 0 }, { 0, 0, 1 }, { 0, 1, 1 } };

            MatrixInt result = MatrixBinPower(new MatrixInt(matrix, mod), n);

            return result[2, 2];
        }

        public static long[] GetFibonacciSequence(int n)
        {
            long[] result = new long[n];
            result[0] = result[1] = 1;

            for (int i = 2; i < n; i++)
            {
                result[i] = result[i - 1] + result[i - 2];
            }

            return result;
        }

        public static long GetInverseElement(long a, long mod)
        {
            long x, y;
            long g = ExtendedGcd(a, mod, out x, out y);

            if (g != 1)
            {
                return -1;
            }

            return ((x % mod) + mod) % mod;
        }

        public static long[] GetAllInverseElements(long mod)
        {
            long[] result = new long[mod];
            result[1] = 1;
            for (int i = 2; i < mod; i++)
            {
                result[i] = (mod - (((mod / i) * result[mod % i]) % mod)) % mod;
            }

            return result;
        }
    }

    internal static class Reader
    {
        public static void ReadInt(out int a)
        {
            int[] number = new int[1];
            ReadInt(number);
            a = number[0];
        }

        public static void ReadInt(out int a, out int b)
        {
            int[] numbers = new int[2];
            ReadInt(numbers);
            a = numbers[0];
            b = numbers[1];
        }

        public static void ReadInt(out int int1, out int int2, out int int3)
        {
            int[] numbers = new int[3];
            ReadInt(numbers);
            int1 = numbers[0];
            int2 = numbers[1];
            int3 = numbers[2];
        }

        public static void ReadInt(out int int1, out int int2, out int int3, out int int4)
        {
            int[] numbers = new int[4];
            ReadInt(numbers);
            int1 = numbers[0];
            int2 = numbers[1];
            int3 = numbers[2];
            int4 = numbers[3];
        }

        public static void ReadLong(out long a)
        {
            long[] number = new long[1];
            ReadLong(number);
            a = number[0];
        }

        public static void ReadLong(out long a, out long b)
        {
            long[] numbers = new long[2];
            ReadLong(numbers);
            a = numbers[0];
            b = numbers[1];
        }

        public static void ReadLong(out long int1, out long int2, out long int3)
        {
            long[] numbers = new long[3];
            ReadLong(numbers);
            int1 = numbers[0];
            int2 = numbers[1];
            int3 = numbers[2];
        }

        public static void ReadLong(out long int1, out long int2, out long int3, out long int4)
        {
            long[] numbers = new long[4];
            ReadLong(numbers);
            int1 = numbers[0];
            int2 = numbers[1];
            int3 = numbers[2];
            int4 = numbers[3];
        }

        public static void ReadInt(int[] numbers)
        {
            // ReSharper disable PossibleNullReferenceException
            var list = Console.ReadLine().Split();
            // ReSharper restore PossibleNullReferenceException

            int count = Math.Min(numbers.Length, list.Length);

            for (int i = 0; i < count; i++)
            {
                numbers[i] = int.Parse(list[i]);
            }
        }

        public static int[] ReadDigits()
        {
            // ReSharper disable AssignNullToNotNullAttribute
            return Console.ReadLine().Select(x => int.Parse(x.ToString())).ToArray();
            // ReSharper restore AssignNullToNotNullAttribute
        }

        public static void ReadLong(long[] numbers)
        {
            // ReSharper disable PossibleNullReferenceException
            var list = Console.ReadLine().Split();
            // ReSharper restore PossibleNullReferenceException

            int count = Math.Min(numbers.Length, list.Length);

            for (int i = 0; i < count; i++)
            {
                numbers[i] = long.Parse(list[i]);
            }
        }

        public static void ReadDouble(double[] numbers)
        {
            // ReSharper disable PossibleNullReferenceException
            var list = Console.ReadLine().Split();
            // ReSharper restore PossibleNullReferenceException

            int count = Math.Min(numbers.Length, list.Length);

            for (int i = 0; i < count; i++)
            {
                numbers[i] = double.Parse(list[i]);
            }
        }

        public static void ReadDouble(out double a, out double b)
        {
            double[] numbers = new double[2];
            ReadDouble(numbers);
            a = numbers[0];
            b = numbers[1];
        }

        public static void ReadDouble(out double int1, out double int2, out double int3)
        {
            double[] numbers = new double[3];
            ReadDouble(numbers);
            int1 = numbers[0];
            int2 = numbers[1];
            int3 = numbers[2];
        }

        public static string ReadLine()
        {
            return Console.ReadLine();
        }
    }

    static class MyMath
    {
        public static int GetMinimalPrimeDivisor(int n)
        {
            for (int i = 2; i * i <= n; i++)
            {
                if (n % i == 0)
                {
                    return i;
                }
            }

            return n;
        }

        public static long Sqr(long x)
        {
            return x * x;
        }
    }

    public interface IGraph
    {
        int Vertices  { get; set; }

        IList<int> this[int i] { get; }

        void AddEdge(int u, int v);

        void AddOrientedEdge(int u, int v);
    }

    public class Graph : IGraph
    {
        private List<int>[] m_Edges;

        public int Vertices { get; set; }

        public IList<int> this[int i]
        {
            get
            {
                return this.m_Edges[i];
            }
        }

        public Graph(int vertices)
        {
            this.Vertices = vertices;

            this.m_Edges = new List<int>[vertices];

            for (int i = 0; i < vertices; i++)
            {
                this.m_Edges[i] = new List<int>();
            }
        }

        public void AddEdge(int u, int v)
        {
            this.AddOrientedEdge(u, v);
            this.AddOrientedEdge(v, u);
        }

        public void AddOrientedEdge(int first, int second)
        {
            this.m_Edges[first].Add(second);
        }

        public int[] Bfs(int start)
        {
            int[] d = new int[Vertices];
            for (int i = 0; i < Vertices; i++)
            {
                d[i] = -1;
            }

            Queue<int> queue = new Queue<int>();
            queue.Enqueue(start);
            d[start] = 0;

            while (queue.Count > 0)
            {
                int v = queue.Dequeue();
                foreach (int t in this.m_Edges[v].Where(t => d[t] == -1))
                {
                    queue.Enqueue(t);
                    d[t] = d[v] + 1;
                }
            }

            return d;
        }
    }

    class SimpleSumTable
    {
        private readonly int[,] m_Sum;

        public SimpleSumTable(int n, int m, int[,] table)
        {
            m_Sum = new int[n + 1, m + 1];

            for (int i = 1; i < n + 1; i++)
            {
                for (int j = 1; j < m + 1; j++)
                {
                    m_Sum[i, j] = m_Sum[i, j - 1] + m_Sum[i - 1, j] - m_Sum[i - 1, j - 1] + table[i, j];
                }
            }
        }

        public int GetSum(int l, int b, int r, int t)
        {
            return m_Sum[r, t] - m_Sum[r, b] - m_Sum[l, t] + m_Sum[l, b];
        }
    }

    class SegmentTreeSimpleInt<T>
    {
        public int Size { get; private set; }

        private readonly T[] m_Tree;

        private Func<T, T, T> m_Operation;

        private T m_Null;

        public SegmentTreeSimpleInt(int size, Func<T, T, T> operation, T nullElement, IList<T> array = null)
        {
            this.Size = size;
            this.m_Operation = operation;
            this.m_Null = nullElement;

            m_Tree = new T[4 * size];
            if (array != null)
            {
                this.Build(array, 1, 0, size - 1);
            }
        }

        private void Build(IList<T> array, int v, int tl, int tr)
        {
            if (tl == tr)
            {
                m_Tree[v] = array[tl];
            }
            else
            {
                int tm = (tl + tr) / 2;
                this.Build(array, 2 * v, tl, tm);
                this.Build(array, 2 * v + 1, tm + 1, tr);
                this.CalculateNode(v);
            }
        }

        public T GetSum(int l, int r)
        {
            return GetSum(1, 0, Size - 1, l, r);
        }

        private T GetSum(int v, int tl, int tr, int l, int r)
        {
            if (l > r)
            {
                return m_Null;
            }

            if (l == tl && r == tr)
            {
                return m_Tree[v];
            }

            int tm = (tl + tr) / 2;

            return this.m_Operation(GetSum(2 * v, tl, tm, l, Math.Min(r, tm)),GetSum(2 * v + 1, tm + 1, tr, Math.Max(l, tm + 1), r));
        }

        public void Update(int pos, T newValue)
        {
            Update(1, 0, Size - 1, pos, newValue);
        }

        private void Update(int v, int tl, int tr, int pos, T newValue)
        {
            if (tl == tr)
            {
                m_Tree[v] = newValue;
            }
            else
            {
                int tm = (tl + tr) / 2;
                if (pos <= tm)
                {
                    Update(2 * v, tl, tm, pos, newValue);
                }
                else
                {
                    Update(2 * v + 1, tm + 1, tr, pos, newValue);
                }
                this.CalculateNode(v);
            }
        }

        private void CalculateNode(int v)
        {
            m_Tree[v] = this.m_Operation(m_Tree[2 * v], m_Tree[2 * v + 1]);
        }
    }

    struct Pair<TFirst, TSecond>
    {
        public Pair(TFirst first, TSecond second)
            : this()
        {
            this.First = first;
            this.Second = second;
        }

        public TFirst First { set; get; }

        public TSecond Second { set; get; }
    }

    internal class AccumulativeDictionary<TKey> : Dictionary<TKey, int>
    {
        public new void Add(TKey key, int value = 1)
        {
            if (this.ContainsKey(key))
            {
                base[key] += value;
            }
            else
            {
                base.Add(key, value);
            }
        }

        public new int this[TKey key]
        {
            get
            {
                return this.ContainsKey(key) ? base[key] : 0;
            }
            set
            {
                this.Add(key, value);
            }
        }
    }

    class PriorityQueue<T>
    {
        public PriorityQueue(Comparison<T> comparison = null)
        {
            if (comparison == null)
            {
                if (typeof(T).GetInterfaces().Any(i => i == typeof(IComparable)))
                {
                    m_Comparison = (a, b) => ((IComparable)a).CompareTo(b);
                }
                else
                {
                    throw new ApplicationException("Add comparer");
                }
            }
            else
            {
                m_Comparison = comparison;
            }
        }

        public int Count { get; private set; }

        public void Enqueue(T item)
        {
            m_List.Add(item);
            m_Indexes.Add(item, this.Count);
            this.Count++;
            Up(this.Count);
        }

        public T Peek()
        {
            return m_List[0];
        }

        public T Dequeue()
        {
            if (this.Count > 0)
            {
                var result = m_List[0];

                Swap(0, this.Count - 1);
                m_Indexes.Remove(m_List[this.Count - 1]);
                m_List.RemoveAt(this.Count - 1);
                this.Count--;
                this.Down(1);

                return result;
            }
            throw new ApplicationException("Couldn't get element from empty queue");
        }

        public void Update(T item)
        {
            int index = m_Indexes[item];
            this.Up(index + 1);
        }

        private readonly List<T> m_List = new List<T>();

        private readonly Dictionary<T, int> m_Indexes = new Dictionary<T,int>();

        private readonly Comparison<T> m_Comparison;

        private void Up(int index)
        {
            while (index > 1 && m_Comparison.Invoke(m_List[index - 1], m_List[index / 2 - 1]) > 0)
            {
                this.Swap(index - 1, index / 2 - 1);

                index = index / 2;
            }
        }

        private void Down(int index)
        {
            while (2 * index <= this.Count && m_Comparison.Invoke(m_List[index - 1], m_List[2 * index - 1]) < 0 ||
                   2 * index + 1 <= this.Count && m_Comparison.Invoke(m_List[index - 1], m_List[2 * index]) < 0)
            {
                if (2 * index + 1 > this.Count || m_Comparison.Invoke(m_List[2 * index - 1], m_List[2 * index]) > 0)
                {
                    this.Swap(index - 1, 2 * index - 1);
                    index = 2 * index;
                }
                else
                {
                    this.Swap(index - 1, 2 * index);
                    index = 2 * index + 1;
                }
            }
        }

        private void Swap(int i, int j)
        {
            var tmp = m_List[i];
            m_List[i] = m_List[j];
            m_List[j] = tmp;

            m_Indexes[m_List[i]] = i;
            m_Indexes[m_List[j]] = j;
        }
    }

    class Program
    {
        private static StreamReader m_InputStream;

        private static StreamWriter m_OutStream;

        private static void OpenFiles()
        {
            m_InputStream = File.OpenText("input.txt");
            Console.SetIn(m_InputStream);

            m_OutStream = File.CreateText("output.txt");
            Console.SetOut(m_OutStream);
        }

        private static void CloseFiles()
        {
            m_OutStream.Flush();

            m_InputStream.Dispose();
            m_OutStream.Dispose();
        }

        static void Main()
        {
            //OpenFiles();

            new Solution().Solve();

            //CloseFiles();
        }
    }

    internal class Solution
    {
        public void Solve()
        {
            int n, m, k;
            string s = Reader.ReadLine();
            List<int> x = s.Split().Select(int.Parse).ToList();
            n = x[0];
            x.RemoveAt(0);
            s = Reader.ReadLine();
            List<int> y = s.Split().Select(int.Parse).ToList();
            m = y[0];
            y.RemoveAt(0);
            s = Reader.ReadLine();
            List<int> z = s.Split().Select(int.Parse).ToList();
            k = z[0];
            z.RemoveAt(0);

            int a, b;
            Reader.ReadInt(out a, out b);

            double ans = 0;

            double r1 = x.Max();

            foreach (int p1 in y)
            {
                foreach (int p2 in z)
                {
                    double res = (double)p1 / p2 / ((double)a / b + (double)p1 / p2);
                    ans = Math.Max(ans, res);
                }
            }

            Console.WriteLine((r1 * Math.Sqrt(ans)).ToString(CultureInfo.InvariantCulture));
        }
    }
}


package main

import "os"
import "bufio"
import "strconv"
import "sort"
import "math"
import "fmt"

func main(){
	var n, m, k int
	r := bufio.NewScanner(os.Stdin)
	r.Split(bufio.ScanWords)
	r.Scan()
	n, _ = strconv.Atoi(r.Text())
	x := make([]int, n)
	for i:=0; i<n; i++ {
		r.Scan()
		x[i], _ = strconv.Atoi(r.Text())
	}
	r.Scan()
	m, _ = strconv.Atoi(r.Text())
	y := make([]int, m)
	for i:=0; i<m; i++ {
		r.Scan()
		y[i], _ = strconv.Atoi(r.Text())
	}
	r.Scan()
	k, _ = strconv.Atoi(r.Text())
	z := make([]int, k)
	for i:=0; i<k; i++ {
		r.Scan()
		z[i], _ = strconv.Atoi(r.Text())
	}
	var a, b int
	r.Scan()
	a, _ = strconv.Atoi(r.Text())
	r.Scan()
	b, _ = strconv.Atoi(r.Text())
	sort.Ints(x)
	sort.Ints(y)
	sort.Ints(z)
	fmt.Printf("%.12f\n", float64(x[n-1])*math.Sqrt(float64(float64(b*y[m-1])/float64(a*z[0]+b*y[m-1]))))
}


package main

import (
	"os"
	"bufio"
	"strconv"
	"fmt"
	"sort"
	"math"
)

func scanInt(scanner *bufio.Scanner) int {
	scanner.Scan()
	x, _ := strconv.Atoi(scanner.Text())
	return x
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanWords)
	writer := bufio.NewWriter(os.Stdout)
	defer writer.Flush()
	n := scanInt(scanner)
	xs := make([]int, n)
	for i := range xs {
		xs[i] = scanInt(scanner)
	}
	sort.Ints(xs)
	m := scanInt(scanner)
	ys := make([]int, m)
	for i := range ys {
		ys[i] = scanInt(scanner)
	}
	sort.Ints(ys)
	k := scanInt(scanner)
	zs := make([]int, k)
	for i := range zs {
		zs[i] = scanInt(scanner)
	}
	sort.Ints(zs)
	A, B := scanInt(scanner), scanInt(scanner)
	r1, p1, p2 := xs[n-1], ys[m-1], zs[0]
	r2 := math.Sqrt(float64(r1*r1) / (1.0 + float64(A*p2)/float64(B*p1)))
	writer.WriteString(fmt.Sprintf("%f\n", r2))
}


package main

import (
    "fmt"
    "math"
)

func main() {
    var n,m,k int
    var A,B,f float64
    r1, p1, p2 := float64(0), float64(0), float64(5000)
    fmt.Scan(&n)
    for i := 0; i < n; i++ {
        fmt.Scan(&f)
        if r1 < f { r1 = f }
    }
    fmt.Scan(&m)
    for i := 0; i < m; i++ {
        fmt.Scan(&f)
        if p1 < f { p1 = f }
    }
    fmt.Scan(&k)
    for i := 0; i < k; i++ {
        fmt.Scan(&f)
        if p2 > f { p2 = f }
    }
    fmt.Scan(&A,&B)
    fmt.Println(r1*math.Sqrt((B*p1)/((B*p1)+(A*p2))))
}


// 215B-mic
package main

import (
	"fmt"
	"math"
)

func main() {
	var d, p1, r1, p2, a, b float64
	var n, i int
	p2 = 1e9 + 7
	fmt.Scan(&n)
	for i = 0; i < n; i++ {
		fmt.Scan(&d)
		r1 = math.Max(r1, d)
	}
	fmt.Scan(&n)
	for i = 0; i < n; i++ {
		fmt.Scan(&d)
		p1 = math.Max(p1, d)
	}
	fmt.Scan(&n)
	for i = 0; i < n; i++ {
		fmt.Scan(&d)
		p2 = math.Min(p2, d)
	}
	fmt.Scan(&a, &b)
	fmt.Printf("%.9f\n", float64(r1*float64(math.Sqrt((b*p1)/(b*p1+a*p2)))))
}


<?php
$a = max(array_slice(explode(" ", trim(fgets(STDIN))), 1));
$b = max(array_slice(explode(" ", trim(fgets(STDIN))), 1));
$c = min(array_slice(explode(" ", trim(fgets(STDIN))), 1));
list($d, $e) = explode(" ", trim(fgets(STDIN)));
$f = $a * sqrt(($b * $e) / (($b * $e) + ($c * $d)));
$f = number_format($f, 6, ".", "");
print $f;
?>


<?php

error_reporting(0);

solve();

function solve(){

	//$Input = new Input("input.txt");
	$Input = new Input();

	$N = (int)$Input->in();

	$max_x = -1;

	for ($i = 0; $i < $N; $i++)
	{
		$X = (int)$Input->in();
		$max_x = max($max_x, $X);
	}

	$M = (int)$Input->in();

	$max_y = -1;

	for ($i = 0; $i < $M; $i++)
	{
		$Y = (int)$Input->in();
		$max_y = max($max_y, $Y);
	}

	$K = (int)$Input->in();

	$min_z = 5001;

	for ($i = 0; $i < $K; $i++)
	{
		$Z = (int)$Input->in();
		$min_z = min($min_z, $Z);

	}

	$A = (int)$Input->in();
	$B = (int)$Input->in();
	$temp = ($A / $B) * ($min_z / $max_y) + 1;

	print($max_x / sqrt($temp));
}

class Input{
	private $handle = "";
	private $values = array();
	private $index = 0;

	public function __construct($localfile){

		if (is_file($localfile)) {

			$this->handle = fopen($localfile, "r");
			$contents = stream_get_contents($this->handle);

		} else {

			$contents = stream_get_contents(STDIN);

		}

		$no_newlines = str_replace(array("\r\n", "\r", "\n"), " ", $contents);
		$this->values = explode(" ", $no_newlines);
	}

	public function in(){

		return $this->values[$this->index++];

	}

	public function close(){

		if (is_file($localfile) && feof($this->handle)) fclose($this->handle);

	}
}

?>


<?php

//$stream = fopen( 'input.txt', 'r' );
$stream = STDIN;

// Input data
$data = stream_get_contents( $stream );

$data = str_replace( array( "\r\n", "\n\r", "\r", "\n" ), ' ', $data );

$data = explode( ' ', $data );

$x = array();
$y = array();
$z = array();

$line_counts = array();

$line_counts[0] = (int) $data[0];
$line_counts[1] = (int) $data[ $line_counts[0] + 1 ];
$line_counts[2] = (int) $data[ $line_counts[0] + 1 + $line_counts[1] + 1 ];

$A =  (int) $data[ $line_counts[0] + 1 + $line_counts[1] + 1 + $line_counts[2] + 1 ];
$B =  (int) $data[ $line_counts[0] + 1 + $line_counts[1] + 1 + $line_counts[2] + 2 ];

for( $i = 1; $i <= $line_counts[0]; $i++ ) {
	$x[] = (int) $data[$i];
}

for( $i = $line_counts[0] + 2; $i <= $line_counts[0] + $line_counts[1] + 1; $i++ ) {
	$y[] = (int) $data[$i];
}

for( $i = $line_counts[0] + $line_counts[1] + 3; $i <= $line_counts[0] + $line_counts[1] + $line_counts[2] + 2; $i++ ) {
	$z[] = (int) $data[$i];
}

$r1 = max( $x );
$p1 = max( $y );
$p2 = min( $z );

$r2 = sqrt( 1 / ( ( ( $A / $B ) + ( $p1 / $p2 ) ) / ( ( $p1 * $r1 * $r1 ) / $p2 ) ) );

$r2 = number_format( $r2, 12, '.', '' );

echo $r2;


<?php

//$stream = fopen( 'input.txt', 'r' );
$stream = STDIN;

// Input data
$data = stream_get_contents( $stream );

$data = str_replace( array( "\r\n", "\n\r", "\r", "\n" ), ' ', $data );

$data = explode( ' ', $data );

$x = array();
$y = array();
$z = array();

$line_counts = array();

$line_counts[0] = (int) $data[0];
$line_counts[1] = (int) $data[ $line_counts[0] + 1 ];
$line_counts[2] = (int) $data[ $line_counts[0] + 1 + $line_counts[1] + 1 ];

$A =  (int) $data[ $line_counts[0] + 1 + $line_counts[1] + 1 + $line_counts[2] + 1 ];
$B =  (int) $data[ $line_counts[0] + 1 + $line_counts[1] + 1 + $line_counts[2] + 2 ];

for( $i = 1; $i <= $line_counts[0]; $i++ ) {
	$x[] = (int) $data[$i];
}

for( $i = $line_counts[0] + 2; $i <= $line_counts[0] + $line_counts[1] + 1; $i++ ) {
	$y[] = (int) $data[$i];
}

for( $i = $line_counts[0] + $line_counts[1] + 2; $i <= $line_counts[0] + $line_counts[1] + $line_counts[2] + 2; $i++ ) {
	$z[] = (int) $data[$i];
}

$r1 = max( $x );
$p1 = max( $y );
$p2 = min( $z );

$r2 = sqrt( 1 / ( ( ( $A / $B ) + ( $p1 / $p2 ) ) / ( ( $p1 * $r1 * $r1 ) / $p2 ) ) );

$r2 = number_format( $r2, 12, '.', '' );

echo $r2;


<?php
$x = explode(' ',trim(fgets(STDIN)),2);
$xa = explode(' ',$x[1]); sort($xa);
$r1 = $xa[count($xa) - 1];

$y = explode(' ',trim(fgets(STDIN)),2);
$ya = explode(' ',$y[1]); sort($ya);
$p1 = $ya[count($ya) - 1];

$z = explode(' ',trim(fgets(STDIN)),2);
$za = explode(' ',$z[1]); sort($za);
$p2 = $za[0];

list($a,$b) = explode(' ',trim(fgets(STDIN)));

$r2 = sqrt(($p1 * $r1 * $r1) / ($p2 * ($p1 / $p2 + $a / $b)));

print $r2;
?>


#!/usr/bin/env pypy
from __future__ import division, print_function
from collections import defaultdict, Counter, deque
from future_builtins import ascii, filter, hex, map, oct, zip
from itertools import imap as map, izip as zip, permutations, combinations, combinations_with_replacement
from __builtin__ import xrange as range
from math import ceil, factorial, log,tan,pi,cos,sin,radians
from _continuation import continulet
from cStringIO import StringIO
from io import IOBase
import __pypy__
from bisect import bisect, insort, bisect_left, bisect_right
from fractions import Fraction
from functools import reduce
from decimal import *
import string
import sys
import os
import re
inf = float('inf')
mod_ = int(1e9) + 7
mod = 998244353

def factors(n):
    from functools import reduce
    return set(reduce(list.__add__, ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0)))

def sieve(m):
    n=1
    primes = {}
    arr=set([])
    for i in range(2, int(m ** 0.5) + 1):
        a = n // i
        b = m // i
        for k in range(max(2, a), b + 1):
            c = i * k
            primes[c] = 1

    for i in range(max(n, 2), m + 1):
        if i not in primes:
            arr.add(i)

    return arr

class DisjointSetUnion:
    def __init__(self, n):
        self.parent = list(range(n))
        self.size = [1] * n
        self.num_sets = n

    def find(self, a):
        acopy = a
        while a != self.parent[a]:
            a = self.parent[a]
        while acopy != a:
            self.parent[acopy], acopy = a, self.parent[acopy]
        return a

    def union(self, a, b):
        a, b = self.find(a), self.find(b)
        if a != b:
            if self.size[a] < self.size[b]:
                a, b = b, a

            self.num_sets -= 1
            self.parent[b] = a
            self.size[a] += self.size[b]

    def set_size(self, a):
        return self.size[self.find(a)]

    def __len__(self):
        return self.num_sets

def main():
    r1=max(list(map(int,input().split()))[1:])
    p1=max(list(map(int,input().split()))[1:])
    p2=list(map(int,input().split()))[1:]
    a,b=map(int,input().split())
    r2=0
    for j in range(len(p2)):
        ans=r1*(b*p1/(b*p1+a*p2[j]))**0.5
        r2=max(r2,ans)
    print(r2)

# region fastio

BUFSIZE = 8192

class FastI(IOBase):
    def __init__(self, file):
        self._fd = file.fileno()
        self._buffer = StringIO()
        self.newlines = 0

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count("\n") + (not b)
            ptr = self._buffer.tell()
            self._buffer.seek(0, 2), self._buffer.write(b), self._buffer.seek(ptr)
        self.newlines -= 1
        return self._buffer.readline()

class FastO(IOBase):
    def __init__(self, file):
        self._fd = file.fileno()
        self._buffer = __pypy__.builders.StringBuilder()
        self.write = lambda s: self._buffer.append(s)

    def flush(self):
        os.write(self._fd, self._buffer.build())
        self._buffer = __pypy__.builders.StringBuilder()

def print(*args, **kwargs):
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()

def gcd(x, y):
    while y:
        x, y = y, x % y
    return x

sys.stdin, sys.stdout = FastI(sys.stdin), FastO(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

# endregion

if __name__ == "__main__":
    main()


#!/usr/bin/env pypy
from __future__ import division, print_function
from collections import defaultdict, Counter, deque
from future_builtins import ascii, filter, hex, map, oct, zip
from itertools import imap as map, izip as zip, permutations, combinations, combinations_with_replacement
from __builtin__ import xrange as range
from math import ceil, factorial, log,tan,pi,cos,sin,radians
from _continuation import continulet
from cStringIO import StringIO
from io import IOBase
import __pypy__
from bisect import bisect, insort, bisect_left, bisect_right
from fractions import Fraction
from functools import reduce
from decimal import *
import string
import sys
import os
import re
inf = float('inf')
mod_ = int(1e9) + 7
mod = 998244353

def factors(n):
    from functools import reduce
    return set(reduce(list.__add__, ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0)))

def sieve(m):
    n=1
    primes = {}
    arr=set([])
    for i in range(2, int(m ** 0.5) + 1):
        a = n // i
        b = m // i
        for k in range(max(2, a), b + 1):
            c = i * k
            primes[c] = 1

    for i in range(max(n, 2), m + 1):
        if i not in primes:
            arr.add(i)

    return arr

class DisjointSetUnion:
    def __init__(self, n):
        self.parent = list(range(n))
        self.size = [1] * n
        self.num_sets = n

    def find(self, a):
        acopy = a
        while a != self.parent[a]:
            a = self.parent[a]
        while acopy != a:
            self.parent[acopy], acopy = a, self.parent[acopy]
        return a

    def union(self, a, b):
        a, b = self.find(a), self.find(b)
        if a != b:
            if self.size[a] < self.size[b]:
                a, b = b, a

            self.num_sets -= 1
            self.parent[b] = a
            self.size[a] += self.size[b]

    def set_size(self, a):
        return self.size[self.find(a)]

    def __len__(self):
        return self.num_sets

def main():
    r1=max(list(map(int,input().split()))[1:])
    p1=list(map(int,input().split()))[1:]
    p2=list(map(int,input().split()))[1:]
    a,b=map(int,input().split())
    r2=0
    for i in range(len(p1)):
        for j in range(len(p2)):
            ans=r1*(b*p1[i]/(b*p1[i]+a*p2[j]))**0.5
            r2=max(r2,ans)
    print(r2)

# region fastio

BUFSIZE = 8192

class FastI(IOBase):
    def __init__(self, file):
        self._fd = file.fileno()
        self._buffer = StringIO()
        self.newlines = 0

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count("\n") + (not b)
            ptr = self._buffer.tell()
            self._buffer.seek(0, 2), self._buffer.write(b), self._buffer.seek(ptr)
        self.newlines -= 1
        return self._buffer.readline()

class FastO(IOBase):
    def __init__(self, file):
        self._fd = file.fileno()
        self._buffer = __pypy__.builders.StringBuilder()
        self.write = lambda s: self._buffer.append(s)

    def flush(self):
        os.write(self._fd, self._buffer.build())
        self._buffer = __pypy__.builders.StringBuilder()

def print(*args, **kwargs):
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()

def gcd(x, y):
    while y:
        x, y = y, x % y
    return x

sys.stdin, sys.stdout = FastI(sys.stdin), FastO(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

# endregion

if __name__ == "__main__":
    main()


from cmath import sqrt
x=map(float,raw_input().split())[1:]
y=map(float,raw_input().split())[1:]
z=map(float,raw_input().split())[1:]
A, B=map(float,raw_input().split())
#print x, y, z, A, B
x=max(x)
z=min(z)
#print x, y, z
print max([sqrt((Y*B*x*x)/(A*z+Y*B)) for Y in y])


x=map(float,raw_input().split())[1:]
y=map(float,raw_input().split())[1:]
z=map(float,raw_input().split())[1:]
A, B=map(float,raw_input().split())
#print x, y, z, A, B
x=max(x)
y=max(y)
z=min(z)
#print x, y, z
print x/(A*z/B/y+1)**.5


n, *r1_arr = [int(x) for x in input().split()]
m, *p1_arr = [int(x) for x in input().split()]
k, *p2_arr = [int(x) for x in input().split()]
A, B  = [int(x) for x in input().split()]

r1, p1, p2 = max(r1_arr), max(p1_arr), min(p2_arr)

print(((p1 * B * (r1 ** 2)) / (p2 * A + p1 * B)) ** .5)


x = list(map(int, input().split()))[1:]
y = list(map(int, input().split()))[1:]
z = list(map(int, input().split()))[1:]
A, B = map(int, input().split())
r1 = max(x)
p2 = min(z)
def findr2(A, B, r1, p1, p2):
    return ((B*p1*(r1**2))/(A*p2 + B*p1))**0.5

ans = 0
for i in y:
    ans = max(ans, findr2(A, B, r1, i, p2))

print(ans)


import math
r = list(map(int, input().split()))
r = r[1:]
p1 = list(map(int, input().split()))
p1 = p1[1:]
p2 = list(map(int, input().split()))
p2 = p2[1:]
a, b = map(int, input().split())
r1 = max(r)
minm = 1000000000
ratio = min(p2) / max(p1)
r2 = (r1 * r1) / (1 + (ratio * a / b))
print(math.sqrt(r2))


import math

x = [int(i) for i in input().split()]
x.pop(0)
y = [int(i) for i in input().split()]
y.pop(0)
z = [int(i) for i in input().split()]
z.pop(0)

a, b = map(int, input().split())
r1 = max(x)
r2 = math.pow(r1*r1/(a*min(z)/(b*max(y))+1) ,0.5)
print(round(r2,10))


import sys

def main(r1, p1, p2, A, B):
    r1.sort()
    p1.sort()
    p2.sort()
    r = r1[-1]
    p1 = p1[-1]
    p2 = p2[0]
    a = 1 + ((p2*A)/(p1*B))
    return (r**2/(a))**0.5

if __name__ == "__main__":
    mat = []
    for e, line in enumerate(sys.stdin.readlines()):
        if e == 0:
            r1 = list(map(int, line.strip().split()))[1:]
        elif e == 1:
            p1 = list(map(int, line.strip().split()))[1:]
        elif e == 2:
            p2 = list(map(int, line.strip().split()))[1:]
        else:
            A, B = list(map(int, line.strip().split()))
    print(main(r1, p1, p2, A, B))


L1 = [int(x) for x in input().split() ]
L2 = [int(x) for x in input().split() ]
L3 = [int(x) for x in input().split() ]
A, B = [int(x) for x in input().split() ]

r = max(L1[1:])
p1 = max(L2[1:])
p2 = min(L3[1:])

r2 =r *( ( p1 * B ) / ( p1*B + p2*A) )**0.5
print(f'{r2:.12f}')


import math
x=list(map(int,input().split(" ")))
y=list(map(int,input().split(" ")))
z=list(map(int,input().split(" ")))
a,b=map(int,input().split(" "))
q1=max(y[1:])
q2=min(z[1:])
r=max(x[1:])
sq=1/(1+( (a*q2)/(b*q1) ))
print(r*math.sqrt(sq))


a=list(map(int,input().split()))
b=list(map(int,input().split()))
c=list(map(int,input().split()))
n,m=map(int,input().split())
a.remove(a[0])
b.remove(b[0])
c.remove(c[0])
r=max(a)
p1=max(b)
p2=min(c)
k=n/m
s=pow(p1/(k*p2+p1),0.5)
r2=s*r
print(r2)


# ip = open("testdata.txt", "r")

# def input():
# 	return ip.readline().strip()

import math

R1 = list(map(int, input().split()))
P1 = list(map(int, input().split()))
P2 = list(map(int, input().split()))
A, B = map(int, input().split())
R1.sort()
r1 = max(R1[1:])
p1 = max(P1[1:])
p2 = min(P2[1:])

r2 = r1*(B*p1/(B*p1 + A*p2))**0.5
print('%.12f'%r2)


#
# Author: eloyhz
# Date: Sep/18/2020
#
#
#
#

import math

if __name__ == '__main__':
    x = [int(x) for x in input().split()]
    y = [int(x) for x in input().split()]
    z = [int(x) for x in input().split()]
    a, b = [int(x) for x in input().split()]
    n = x[0]
    m = y[0]
    k = z[0]
    max_r2 = 0
    for r in range(n):
        r1 = x[r + 1]
        for s in range(m):
            p1 = y[s + 1]
            for t in range(k):
                p2 = z[t + 1]
#                print(f'{a = }, {b = }, {r1 = }, {p1 = }, {p2 = }')
#                print(f'{math.sqrt(p1 * r1 ** 2 / (a / b * p2 + p1))}')
                r2 = math.sqrt(p1 * r1 ** 2 / (a / b * p2 + p1))
                max_r2 = max(r2, max_r2)
#                print(f'{a / b = }')
#                print(f'{p1 * (r1 ** 2 - r2 ** 2) / (p2 * r2 ** 2) = }')
    print(f'{max_r2:.12f}')


import math

if __name__ == '__main__':
    x = [int(x) for x in input().split()]
    y = [int(x) for x in input().split()]
    z = [int(x) for x in input().split()]
    a, b = [int(x) for x in input().split()]
    n = x[0]
    m = y[0]
    k = z[0]
    max_r2 = 0
    max_p = 0
    for i in range(m):
        p1 = y[i + 1]
        for j in range(k):
            p2 = z[j + 1]
            max_p = max(max_p, p1 / p2)
    for r in range(n):
        r1 = x[r + 1]
        r2 = math.sqrt(max_p * r1 ** 2 / (a / b + max_p))
        max_r2 = max(r2, max_r2)
    print(f'{max_r2:.12f}')


def arr_inp():
    return [int(x) for x in stdin.readline().split()]

def power(x, n):
    return reduce(mul, [x for i in range(n)])

from operator import mul
from functools import reduce
from sys import stdin
from math import sqrt

x, y, z = [arr_inp()[1:] for i in range(3)]
A, B = arr_inp()
ans, ma = 0, power(max(x), 2)

for i in range(len(y)):
    for j in range(len(z)):
        ans = max(sqrt((B * y[i] * ma) / (A * z[j] + B * y[i])), ans)

print('{:.12f}'.format(ans))


def arr_inp():
    return [int(x) for x in stdin.readline().split()]

def power(x, n):
    return reduce(mul, [x for i in range(n)])

from operator import mul
from functools import reduce
from sys import stdin
from math import sqrt

x, y, z = [arr_inp()[1:] for i in range(3)]
A, B = arr_inp()
ans, ma, p1, p2 = 0, power(max(x), 2), max(y), min(z)
ans = max(sqrt((B * p1 * ma) / (A * p2 + B * p1)), ans)

print('{:.12f}'.format(ans))


def arr_inp():
    return [int(x) for x in stdin.readline().split()]

from sys import stdin
from math import sqrt

x, y, z = [arr_inp()[1:] for i in range(3)]
A, B = arr_inp()
ans, ma = 0, max(x) ** 2
for i in range(len(y)):
    for j in range(len(z)):
        ans = max(sqrt((B * y[i] * ma) / (A * z[j] + B * y[i])), ans)
print('{:.12f}'.format(ans))


L=list(map(int,input().split()))
L.pop(0)
M=list(map(int,input().split()))
M.pop(0)
N=list(map(int,input().split()))
N.pop(0)
ab=input().split()
a=int(ab[0])
b=int(ab[1])
den=1+(a/b)*(min(N)/max(M))
ans=max(L)/den**0.5
print(ans)


from sys import stdin,stdout
from collections import deque,Counter,defaultdict
# from itertools import permutations,combinations,combinations_with_replacement
# from operator import itemgetter
# import heapq
# from functools import reduce
from math import sqrt
# from math import round
def ii():return int(stdin.readline())
def mi():return map(int,stdin.readline().split())
def li():return list(mi())
def si():return stdin.readline()

l1 = li()
l2 = li()
l3 = li()
a,b = mi()

r1 = max(l1[1:]);p1 = max(l2[1:]);p2 = min(l3[1:])
ans = sqrt(b*p1/(b*p1+a*p2))*r1
print(f'{ans:.10f}')


from sys import stdin, stdout
import math

def main():
    x = list(map(int, stdin.readline().split()))[1:]
    y = list(map(int, stdin.readline().split()))[1:]
    z = list(map(int, stdin.readline().split()))[1:]
    A, B = map(int, stdin.readline().split())
    # you should always pick the highest value of r1
    r1 = max(x)
    p2 = min(z)

    maxx = 0
    for yy in y:
        maxx = max(maxx, r1**2*yy*B/(A*p2 + yy*B))
    print(math.sqrt(maxx))

main()


from sys import stdin, stdout
import math

def main():
    x = list(map(int, stdin.readline().split()))[1:]
    y = list(map(int, stdin.readline().split()))[1:]
    z = list(map(int, stdin.readline().split()))[1:]
    A, B = map(int, stdin.readline().split())
    # you should always pick the highest value of r1
    r1 = sorted(x)[-1]

    maxx = 0
    for yy in y:
        for zz in z:
            maxx = max(maxx, r1**2*yy*B/(A*zz + yy*B))
    print(math.sqrt(maxx))

main()


from math import sqrt
n=[int(x) for x in input().split()]
m=[int(x) for x in input().split()]
k=[int(x) for x in input().split()]
a,b=map(int,input().split())
ans=0
r1=max(n[1:])
for p1 in (m[1:]):
    for p2 in (k[1:]):
        temp=sqrt((b*p1)/((a*p2)+(b*p1)))
        if r1*temp>ans:
            ans=r1*temp
print(ans)


x_values = list(map(int, input().split()))
y_values = list(map(int, input().split()))
z_values = list(map(int, input().split()))
a, b = map(int, input().split())

r1 = max(x_values[1:])
p1 = max(y_values[1:])
p2 = min(z_values[1:])

r2 = r1 / ((((a * p2) / (b * p1)) + 1) ** 0.5)
print(r2)


from math import sqrt

a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = list(map(int,input().split()))
A,B = map(int,input().split())
print(max(a[1:])/(sqrt((A/B)*(min(c[1:])/max(b[1:]))+1)))


x = [int(i) for i in input().split()]
n = x[0]
r1 = max(x[1:])

y = [int(i) for i in input().split()]
p1 = max(y[1:])

z = [int(i) for i in input().split()]
p2 = min(z[1:])

a, b = map(int, input().split())

print(((b*p1*r1**2)/(a*p2 + b*p1))**0.5)


from math import sqrt
funcion = lambda: list(map(int, input().split()))
r1 = max(funcion()[1:])
p1s = funcion()[1:]
p2 = min(funcion()[1:])
a, b = funcion()
respuesta = round(sqrt(max(b * p1 * r1**2 / float(a * p2 + b * p1) for p1 in p1s)), 12)
print('{:.12f}'.format(respuesta))


r = max(list(map(int, input().split())))
p1 = max(list(map(int, input().split()[1:])))
p2 = min(list(map(int, input().split()[1:])))
a, b = map(int, input().split())
print(r*(1/((1+a*p2/(b*p1))**0.5)))


#include<iostream>
#include<cstdio>
#include<stdlib.h>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include <cmath>
#include<algorithm>
using namespace std;

#define ALL(x) (x).begin(),(x).end()
#define RALL(x) (x).rbegin(), (x).rend()
#define rep(i,n) for(int i=0;i<n;i++)
#define rev(j,m) for(int j=1;j<m;j++)

typedef vector<pair<int,int> > pii;

int main(){
    int n;
    char A[300][300];
    cin >> n;
    rep(i,n){
        rep(j,n){
            cin >> A[i][j];
        }
    }

    set<int> se,se2;
    for(int i=n-1;0<=i;i--){
        se.insert(A[i][i]);
    }

    rep(i,n){
        rep(j,n){
            se.insert(A[i][i]);
            se2.insert(A[i][j]);
        }
    }

    if(se.size()==1&&se2.size()==2)
        cout << "YES" << endl;
    else
        cout << "NO" << endl;

    return 0;
}


#include<iostream>
#include<sstream>
#include<cstdio>
#include<string>
#include<vector>
#include<queue>
#include<utility>
#include<set>
#include<map>
#include<cctype>
#include<cmath>
#include<algorithm>
using namespace std;

#define RALL(x) (x).rbegin(),(x).rend()
#define ALL(x) (x).begin(),(x).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define rev(j,m) for(int j=1;j<=(m);j++)
#define repp(k,l,r) for(int k=0;k<(l);k+=r)
#define EACH(itr,c) for(__typeof((c).begin()) itr=(c).begin(); itr!=(c).end(); itr++)
#define pb push_back

typedef vector<pair<int,int> > pii;
typedef vector<pair<int,string> > pis;
typedef map<string,int> mi;

int main(){int main(){
    int n;
    vector<int> vc;
    set<char> se;
    char A[300][300],c;
    cin >> n;
    rep(i,n){
        rep(j,n){
            cin >> A[i][j];
        }
    }

    c=A[0][0];
        for(int j=n-1,i=0;0<=j;j--,i++){
            if(c!=A[i][j]||c!=A[i][i]){
                cout << "NO" << endl;
                return 0;
            }
        }

    rep(i,n){
        rep(j,n){
            if(c!=A[i][j]){
                vc.push_back(1);
                se.insert(A[i][j]);
            }
        }

    }

    if(se.size()==1&&vc.size()==n*(n-2)+1)
        cout << "YES" << endl;
    else
        cout << "NO" << endl;

    return 0;
}


#include <iostream>
#include <stdlib.h>
using namespace std;

int main()
{
    int n;
    cin>>n;
    char mus[n][n];
    char f,s;
    for(int i = 0; i < n ; i++){

        for(int j = 0;j<n;j++){
        cin>>mus[i][j];

        }

    }
    string out="8";
    f = mus[0][0];
    s = mus[0][1];

            for(int i = 0; i < n ;i++){
                if(out=="NO"){
                    break;
                }
                for(int j = 0; j < n ;j++){
                    if(mus[i][j] == f || mus[i][j] == s){
                        out = "YES";
                    }else{out = "NO";break;}

                }
            }

        cout<<out;

}


#include <iostream>
#include <stdlib.h>
#include <math.h>       /* ceil */

using namespace std;

int main()
{
    int n;
    cin>>n;
    char mus[n][n];
    double ite = n;
    ite = ceil(ite/2);
    char f,s;

    for(int i = 0; i < n ; i++){

        for(int j = 0;j<n;j++){
        cin>>mus[i][j];

        }

    }
    string out="";
    f = mus[0][0];
    s = mus[0][1];
                int itee = ite;
                bool odd = false;

            for(int i = 0;i < n;i++){
                    if(out == "NO")
                        break;
                for(int j = 0; j < ite-1;j++){

                        if(odd){
                            if(mus[i][j] == mus[i][n-1-j] && mus[i][itee-1] == f){
                                out="YES";
                            }else{
                                out="NO";
                                break;
                            }

                        }

                        else{
                            if(mus[i][j] == mus[i][n-1-j] && mus[i][itee-1] == s){
                                out="YES";
                            }else{
                                out="NO";
                                break;
                            }
                        }
                }

                if(odd)
                    odd = false;
                else
                    odd = true;
            }
            if(out=="YES")
                if(mus[itee-1][itee-1]!=f||f==s)out="NO";

        cout<<out;

}


#include <iostream>
#include <stdlib.h>
using namespace std;

int main()
{
    int n;
    cin>>n;
    char mus[n][n];
    char f,s;
    for(int i = 0; i < n ; i++){

        for(int j = 0;j<n;j++){
        cin>>mus[i][j];

        }

    }
    string out="51";
    f = mus[0][0];
    s = mus[0][1];

            for(int i = 0; i < n ;i++){
                if(out=="NO"){
                    break;
                }
                for(int j = 0; j < n ;j++){
                    if(mus[i][j] == f || mus[i][j] == s){
                        out = "YES";
                    }else{out = "NO";break;}

                }
            }

        cout<<out;

}


#include <iostream>
#include <stdlib.h>
using namespace std;

int main()
{
    int n;
    cin>>n;
    char mus[n][n];
    char f,s;
    for(int i = 0; i < n ; i++){

        for(int j = 0;j<n;j++){
        cin>>mus[i][j];

        }

    }
    string out="";
    f = mus[0][0];
    s = mus[0][1];

            for(int i = 0; i < n ;i++){
                if(out=="NO"){
                    break;
                }
                for(int j = 0; j < n ;j++){
                    if(mus[i][j] == f || mus[i][j] == s){
                        out = "YES";
                    }else{out = "NO";break;}

                }
            }
            if(f==s)
                out="NO";

        cout<<out;

}


#include <iostream>
#include <stdlib.h>
using namespace std;

int main()
{
    int n;
    cin>>n;
    char mus[n][n];
    char f,s;
    for(int i = 0; i < n ; i++){

        for(int j = 0;j<n;j++){
        cin>>mus[i][j];

        }

    }
    string out="4";
    f = mus[0][0];
    s = mus[0][1];

            for(int i = 0; i < n ;i++){
                if(out=="NO"){
                    break;
                }
                for(int j = 0; j < n ;j++){
                    if(mus[i][j] == f || mus[i][j] == s){
                        out = "YES";
                    }else{out = "NO";break;}

                }
            }

        cout<<out;

}


#include <iostream>
#include <stdlib.h>
using namespace std;

int main()
{
    int n;
    cin>>n;
    char mus[n][n];
    char f,s;
    for(int i = 0; i < n ; i++){

        for(int j = 0;j<n;j++){
        cin>>mus[i][j];

        }

    }
    string out="3";
    f = mus[0][0];
    s = mus[0][1];

            for(int i = 0; i < n ;i++){
                if(out=="NO"){
                    break;
                }
                for(int j = 0; j < n ;j++){
                    if(mus[i][j] == f || mus[i][j] == s){
                        out = "YES";
                    }else{out = "NO";break;}

                }
            }

        cout<<out;

}


#include <iostream>
#include <stdlib.h>
#include <math.h>       /* ceil */

using namespace std;

int main()
{
    int n;
    cin>>n;
    char mus[n][n];
    double ite = n;
    ite = ceil(ite/2);
    char f,s;

    for(int i = 0; i < n ; i++){

        for(int j = 0;j<n;j++){
        cin>>mus[i][j];

        }

    }
    string out="";
    f = mus[0][0];
    s = mus[0][1];
                int itee = ite;
                bool odd = false;

            for(int i = 0;i < n;i++){
                if(out == "NO")
                    break;

                for(int j = 0; j < ite-1;j++){
                    if(mus[i][j] == mus[i][n-1-j]){
                        out="YES";
                    }else{
                        out="NO";
                        break;
                    }
                }
            }
            if(out=="YES"){
              for(int j = 0; j < ite-1;j++){
                    if(mus[j][itee-1] == mus[n-1-j][itee-1]){
                        out="YES";
                    }else{
                        out="NO";
                        break;
                    }
                }
            }

            if(out=="YES")
                if(mus[itee-1][itee-1]!=f||f==s)out="NO";

        cout<<out;

}


#include <iostream>
#include <stdlib.h>
using namespace std;

int main()
{
    int n;
    cin>>n;
    char mus[n][n];
    char f,s;
    for(int i = 0; i < n ; i++){

        for(int j = 0;j<n;j++){
        cin>>mus[i][j];

        }

    }
    string out="78";
    f = mus[0][0];
    s = mus[0][1];

            for(int i = 0; i < n ;i++){
                if(out=="NO"){
                    break;
                }
                for(int j = 0; j < n ;j++){
                    if(mus[i][j] == f || mus[i][j] == s){
                        out = "YES";
                    }else{out = "NO";break;}

                }
            }

        cout<<out;

}


#include <iostream>
#include <stdlib.h>
using namespace std;

int main()
{
    int n;
    cin>>n;
    char mus[n][n];
    char f,s;
    for(int i = 0; i < n ; i++){

        for(int j = 0;j<n;j++){
        cin>>mus[i][j];

        }

    }
    string out="55";
    f = mus[0][0];
    s = mus[0][1];

            for(int i = 0; i < n ;i++){
                if(out=="NO"){
                    break;
                }
                for(int j = 0; j < n ;j++){
                    if(mus[i][j] == f || mus[i][j] == s){
                        out = "YES";
                    }else{out = "NO";break;}

                }
            }

        cout<<out;

}


#include <iostream>
#include <stdlib.h>
using namespace std;

int main()
{
    int n;
    cin>>n;
    char mus[n][n];
    char f,s;
    for(int i = 0; i < n ; i++){

        for(int j = 0;j<n;j++){
        cin>>mus[i][j];

        }

    }
    string out="";
    f = mus[0][0];
    s = mus[0][1];

            for(int i = 0; i < n ;i++){
                if(out=="NO"){
                    break;
                }
                for(int j = 0; j < n ;j++){
                    if(mus[i][j] == f || mus[i][j] == s){
                        out = "YES";
                    }else{out = "NO";break;}

                }
            }

        cout<<out;

}


#include <iostream>
#include <stdio.h>
using namespace std;

int main() {
    int i,j,al[30],n,k,l;
    char a[310][310];
    cin>>n;
    getchar();
    for(i=0;i<30;i++)
        al[i]=0;
    for(i=0;i<n;i++)
    {
        gets(a[i]);
        for(j=0;j<n;j++)
            al[a[i][j]-'a']++;
        getchar();
    }
    k=2*n-1;
    l=n*n;
    if(al[a[0][0]-'a']==k && al[a[1][0]-'a']==l-k)
        cout<<"YES"<<endl;
    else
        cout<<"NO"<<endl;
    return 0;
}


#include <iostream>
#include <stdio.h>
using namespace std;

int main() {
    int i,j,al[30],n,k,l;
    char a[300][300];
    cin>>n;
    getchar();
    for(i=0;i<30;i++)
        al[i]=0;
    for(i=0;i<n;i++)
    {
        gets(a[i]);
        for(j=0;j<n;j++)
            al[a[i][j]-'a']++;
    }
    k=2*n-1;
    l=n*n-k;
    if(al[a[0][0]-'a']==k && al[a[1][0]-'a']==l)
        cout<<"YES"<<endl;
    else
        cout<<"NO"<<endl;
    return 0;
}


#include <iostream>
using namespace std;

int main() {
    int i,j,al[30],n,k,l;
    char a[300][300];
    cin>>n;
    getchar();
    for(i=0;i<30;i++)
        al[i]=0;
    for(i=0;i<n;i++)
    {
        gets(a[i]);
        for(j=0;j<n;j++)
            al[a[i][j]-'a']++;
    }
    k=2*n-1;
    l=n*n-k;
    if(al[a[0][0]-'a']==k && al[a[1][0]-'a']==l)
        cout<<"YES"<<endl;
    else
        cout<<"NO"<<endl;
    return 0;
}


#include <iostream>
#include <stdio.h>
using namespace std;

int main() {
    int i,j,al[30],n,k,l;
    char a[310][310];
    cin>>n;
    getchar();
    for(i=0;i<30;i++)
        al[i]=0;
    for(i=0;i<n;i++)
    {
        gets(a[i]);
        for(j=0;j<n;j++)
            al[a[i][j]-'a']++;
    }
    k=2*n-1;
    l=n*n;
    if(al[a[0][0]-'a']==k && al[a[1][0]-'a']==l-k)
        cout<<"YES"<<endl;
    else
        cout<<"NO"<<endl;
    return 0;
}


#include <iostream>
#include <stdio.h>
using namespace std;

int main() {
    int i,j,al[30],n;
    char a[300][300];
    cin>>n;
    getchar();
    for(i=0;i<30;i++)
        al[i]=0;
    for(i=0;i<n;i++)
    {
        gets(a[i]);
        for(j=0;j<n;j++)
            al[a[i][j]-'a']++;
    }
    if(al[a[0][0]-'a']==(2*n-1) && al[a[0][1]-'a']==(n*n-2*n+1))
        cout<<"YES"<<endl;
    else
        cout<<"NO"<<endl;
    return 0;
}


#include <iostream>
#include <stdio.h>
using namespace std;

int main() {
    int i,j,al[30],n,k,l;
    char a[300][300];
    cin>>n;
    getchar();
    for(i=0;i<30;i++)
        al[i]=0;
    for(i=0;i<n;i++)
    {
        gets(a[i]);
        for(j=0;j<n;j++)
            al[a[i][j]-'a']++;
    }
    k=2*n-1;
    l=n*n;
    if(al[a[0][0]-'a']==k && al[a[1][0]-'a']==l-k)
        cout<<"YES"<<endl;
    else
        cout<<"NO"<<endl;
    return 0;
}


#include <iostream>
#include<stdio.h>
using namespace std;

int main() {
    int i,j,al[30],n;
    char a[300][300];
    cin>>n;
    getchar();
    for(i=0;i<30;i++)
        al[i]=0;
    for(i=0;i<n;i++)
    {
        gets(a[i]);
        for(j=0;j<n;j++)
            al[a[i][j]-'a']++;
    }
    if(al[a[0][0]-'a']==(2*n-1) && al[a[0][1]-'a']==(n*n-2*n+1))
        cout<<"YES"<<endl;
    else
        cout<<"NO"<<endl;
    return 0;
}


#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;

char ch[330][330];

int main()
{
    freopen("ain.txt","r",stdin);
    int i,k,j,n,m;
    while(scanf("%d", &n)!=EOF)
    {
        getchar();
        for(i=0;i<n;i++)
            gets(ch[i]);
        char na=ch[0][0];
        char nb=ch[1][0];
        if(na != ch[1][1])
        {
            puts("NO");
            continue;
        }
        if(nb != ch[0][1])
        {
            puts("NO");
            continue;
        }
        if(na==nb)
        {
            puts("NO");
            continue;
        }
        int ok=0;
        for(i=0;i<n;i++)
        {
            for(j=0;j<n;j++)
            {
                if(i == j || (i+j) == (n-1))
                {
                    if(ch[i][j] != na)
                    {
                        ok=1;
                        break;
                    }
                }
                else
                {
                    if(ch[i][j] != nb)
                    {
                        ok=1;
                        break;
                    }
                }
            }
            if(ok == 1)
                break;
        }

        if(ok==1)
            puts("NO");
        else
            puts("YES");
    }
    return 0;
}


#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;

char ch[330][330];
char ch1[90001];
char ch2[90001];

int main()
{

    int i,k,j,n,m;
    while(scanf("%d", &n)!=EOF)
    {
        getchar();
        for(i=0;i<n;i++)
            scanf("%s",ch[i]);

        char na=ch[0][0];
        char nb=ch[1][0];
        int ok=0;
        int taa1=0;
        int taa2=0;
        if(na==nb)
            ok=1;

        for(i=0;i<n;i++)
        {

            for(j=0;j<n;j++)
            {
                if(i == j || i+j == (n-1))
                    ch1[taa1++]=ch[i][j];
                else
                    ch2[taa2++]=ch[i][j];

            }

        }

        for(i=1;i<taa1;i++)
        {
            if(ch1[i-1]!=ch1[i])
            {
                ok=1;
                break;
            }
        }

        for(i=1;i<taa2;i++)
        {
            if(ch2[i-1]!=ch2[i])
            {
                ok=1;
                break;
            }
        }

        if(ok==1)
            puts("NO");
        else
            puts("YES");
    }
    return 0;
}


#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;

char ch[330][330];
char ch1[90001];
char ch2[90001];

int main()
{
//    freopen("ain.txt","r",stdin);
    int i,k,j,n,m;
    while(scanf("%d", &n)!=EOF)
    {
        getchar();
        for(i=0;i<n;i++)
            scanf("%s",ch[i]);

        char na=ch[0][0];
        char nb=ch[1][0];
        int ok=0;
        int taa1=0;
        int taa2=0;

        for(i=0;i<n;i++)
        {

            for(j=0;j<n;j++)
            {
                if(i == j || i+j == (n-1))
                    ch1[taa1++]=ch[i][j];
                else
                    ch2[taa2++]=ch[i][j];

            }

        }

        for(i=1;i<taa1;i++)
        {
            if(ch1[i-1]!=ch1[i])
            {
                ok=1;
                break;
            }
        }

        for(i=1;i<taa2;i++)
        {
            if(ch2[i-1]!=ch2[i])
            {
                ok=1;
                break;
            }
        }

        if(ok==1)
            puts("NO");
        else
            puts("YES");
    }
    return 0;
}