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