#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
#define ALL(x) (x).begin(), (x).end()
#define REP(i ,n) for(int i = 0; i < (int)(n); i++)
#define pb push_back
#define mp make_pair
typedef vector<int>vint;
typedef vector<ll>vll;
template<typename T> istream &operator>>(istream &is, vector<T> &vec){ for (auto &v : vec) is >> v; return is; }
template<typename A,typename B>inline bool chmin(A &a,const B &b){if(a>b){a=b;return true;}else{return false;}}
template<typename A,typename B>inline bool chmax(A &a,const B &b){if(a<b){a=b;return true;}else{return false;}}

int main()
{
    double sx,sy,gx,gy;
    cin >> sx >> sy >> gx >> gy;
    double ans = (sy*gx + sx*gy)/(sy+gy);
    cout << fixed << setprecision(10);
    cout << ans << endl;
}
#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long a,b,n,m,x1,x2,x3,x4,k,k1;
    cin>>n>>m>>a>>b;
    x1=n-a;
    x2=n-b;
    x3=m-a;
    x4=m-b;
    k=max(x1,x2);
    k1=max(x3,x4);
    cout<<max(k,k1)<<endl;
}

