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