import java.util.*;
import java.lang.*;
import java.io.*;
class Ideone
{
{
Scanner in
= new Scanner
(System.
in); int n=in.nextInt();
double[] A = new double[n];
double[] B = new double[n];
double[] C = new double[n+1];
double inf = 1.0 / 0;
C[n] = 0.0;
int k=0;
while(k<n){
A[k] = in.nextDouble();
k++;
}
int t=0;
while(t<n){
B[t]=in.nextDouble();
t++;
}
for (int i=1; i<=n; i++){
if(B[n-i]-C[n-i+1]!=0) C[n-i]=A[n-i]/(B[n-i]-C[n-i+1]);
else C[n-i]=inf;
}
for (int i=0; i<=n; i++){
ans
+=Double.
toString(C
[i
])+" "; }
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgpjbGFzcyBJZGVvbmUKewoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpIHRocm93cyBqYXZhLmxhbmcuRXhjZXB0aW9uCgl7CgkJU2Nhbm5lciBpbiA9IG5ldyBTY2FubmVyKFN5c3RlbS5pbik7CgkJaW50IG49aW4ubmV4dEludCgpOwoJCWRvdWJsZVtdIEEgPSBuZXcgZG91YmxlW25dOwoJCWRvdWJsZVtdIEIgPSBuZXcgZG91YmxlW25dOwoJCWRvdWJsZVtdIEMgPSBuZXcgZG91YmxlW24rMV07CgkJU3RyaW5nIGFucyA9IG5ldyBTdHJpbmcoIiIpOwoJCWRvdWJsZSBpbmYgPSAxLjAgLyAwOwoJCUNbbl0gPSAwLjA7CgkJaW50IGs9MDsKCQl3aGlsZShrPG4pewoJCQlBW2tdID0gaW4ubmV4dERvdWJsZSgpOwoJCQlrKys7CgkJfQoJCVN0cmluZyBjPWluLm5leHRMaW5lKCk7CgkJaW50IHQ9MDsKCQl3aGlsZSh0PG4pewoJCQlCW3RdPWluLm5leHREb3VibGUoKTsKCQkJdCsrOwoJCX0KCQlmb3IgKGludCBpPTE7IGk8PW47IGkrKyl7CgkJCWlmKEJbbi1pXS1DW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