A, B, X, Y = map(int, input().split()) print(min((A + B) * X / A, (A + B) * Y / B))