#include using namespace std; int main() { double d = 1; double t1, k1, t2, k2; cin >> t1 >> k1 >> t2 >> k2; double v = k1 / t1 + k2 / t2; cout << fixed << setprecision(12) << 1.0 / v << endl; return 0; }