real*8::A,B,X,Y read *,A,B,X,Y print '(f0.15)', MIN(X*B/A,Y)+MIN(X,Y*A/B) end