a,b,x,y = map(float, raw_input().split()) if b*x == a*y: print x+y elif b*x > a*y: print y*(a+b)/b else: print x*(a+b)/a