#include using namespace std; float cmmmc(int a,int b) { int x = a; int y = b; while (a != b) { if (a > b) b+=y; else a+=x; } return a; } int main() { float t1,k1,t2,k2; cin >> t1 >> k1 >> t2 >> k2; float dist=cmmmc(t1,t2); float v1=dist/t1*k1; float v2 = dist/t2*k2; cout << setprecision(4) << dist/(v1+v2); return 0; }