#include <bits/stdc++.h>

using namespace std;

int main() {
#ifndef ONLINE_JUDGE
	freopen("cutit.in", "r", stdin);
#endif // ONLINE_JUDGE

	cout << fixed << setprecision(7);
	long long t1, k1, t2, k2;
	cin >> t1 >> k1 >> t2 >> k2;

	if (t1 < t2) {
		swap(t1, t2);
		swap(k1, k2);
	}

	long double v1 = 1, v2 = 1.0 * t1 / t2, delta = t1;
	cout << (delta / (v1 * k1 + v2 * k2));

	return 0;
}