# yukicoder No.236 鴛鴦茶 A, B, X, Y = map(int, input().split()) # どちらかを最大まで使ったと仮定したときに出来る量のminが実際に作れる最大量 total = min(X * (A + B) / A, Y * (A + B) / B) print("{:.7f}".format(total))