A, B, X, Y = map(float, raw_input().split()) if B * X > A * Y: print ((A + B) * Y) / B elif B * X < A * Y: print ((A + B) * X) / A else: print X + Y