#include #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define REP(i,b) FOR(i,0,b) #define F first #define S second #define PB push_back #define BE(c) c.begin(),c.end() using namespace std; typedef long long LL; typedef long double ut; typedef vector VI; const ut INF=1<<30; const int SIZE=1<<12; const ut eps=1e-9; int main(){ double A,B,X,Y; cin >>A >>B >> X >> Y; printf("%lf\n",min(A*Y,B*X)*(A+B)/(A*B)); return 0; }