a, b, x, y = map(int, input().split()) ab = a + b c = ab * x / a t = ab * y / b print(min(c, t))