#include <iostream>
using namespace std;
int main() {
double p, d, a, b, f, t, flyDist;
int n;
cin >> p;
for (int i = 0; i < p; i++){
cin >> n >> d >> a >> b >> f;
t = d / (a + b);
flyDist = f * t;
cout.precision(2);
cout << fixed << n << " " << flyDist << endl;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7Cglkb3VibGUgcCwgZCwgYSwgYiwgZiwgdCwgZmx5RGlzdDsKCWludCBuOwoJY2luID4+IHA7Cglmb3IgKGludCBpID0gMDsgaSA8IHA7IGkrKyl7CgkJY2luID4+IG4gPj4gZCA+PiBhID4+IGIgPj4gZjsKCQl0ID0gZCAvIChhICsgYik7CgkJZmx5RGlzdCA9IGYgKiB0OwoJCWNvdXQucHJlY2lzaW9uKDIpOwoJCWNvdXQgPDwgZml4ZWQgPDwgbiA8PCAiICIgPDwgZmx5RGlzdCA8PCBlbmRsOwoJfQoJcmV0dXJuIDA7Cn0=