#include <iostream>

using namespace std;

double t1, t2, k1, k2, d;

int main() {
    cin >> t1 >> k1 >> t2 >> k2;
    double ans = 1 / (k1 / t1 + k2 / t2);
    cout << ans;
    return 0;
}