#include #include using namespace std; int main() { double a,b,x,y;cin>>a>>b>>x>>y; cout << setprecision(9) << min(x*b,a*y)*(1/b+1/a) << endl; return 0; }