using System; using System.IO; using System.Text.RegularExpressions; namespace YukiCoder.No236 { class CoffeeTea { public static void Main() { var scn = new Scanner(Console.In); int[] a = scn.NextIntAry(); int A = a[0], B = a[1], X = a[2], Y = a[3]; double productMax = 0; if (A*Y >= B*X) { // coffee <= tea productMax = X * (A + B) / (double)A; } else {// coffee > tea productMax = Y * (B + A) / (double)B; } Console.WriteLine("{0:F12}", productMax); } } public class Scanner { private TextReader tr; public Scanner(TextReader tr) { this.tr = tr; } public Scanner(string filePath) { this.tr = new StreamReader(filePath); } private string readLine() { return Regex.Replace(tr.ReadLine(), @"\s+", " ").Trim(); } public string NextStr() { return readLine(); } public string[] NextStrAry() { return readLine().Split(' '); } public int NextInt() { return int.Parse(readLine()); } public int[] NextIntAry() { return Array.ConvertAll(readLine().Split(' '), int.Parse); } } }