A, B, X, Y = map(int, input().split()) if X * B <= Y * A: max_volume = (X * (A + B)) / A else: max_volume = (Y * (A + B)) / B # Format the output to handle decimal precision and trailing zeros formatted = "{0:.12f}".format(max_volume).rstrip('0').rstrip('.') if '.' in "{0:.12f}".format(max_volume) else "{0:.0f}".format(max_volume) print(formatted)