import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); double A = sc.nextInt(); double B = sc.nextInt(); double X = sc.nextInt(); double Y = sc.nextInt(); double max=0; if(A*Y<=B*X){ max=Y*(A+B)/B; }else if(A*Y>B*X){ max=X*(A+B)/A; } System.out.println(max); } }