#include <bits/stdc++.h>
using namespace std;
const int inf = 1.01e9;
const double eps = 1e-9;
const int N = 1e5 + 10;
double mint[N];
double maxt[N];
double p[N];
double q[N];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; (i) < (n); ++i) scanf("%lf", &maxt[i + 1]);
  for (int i = 0; (i) < (n); ++i) scanf("%lf", &mint[i + 1]);
  for (int i = 1; i <= n; ++i) {
    double sum = mint[i] + maxt[i] + p[i - 1] + q[i - 1];
    double prod = maxt[i] + p[i - 1] * q[i - 1];
    double A = 1;
    double B = -sum;
    double C = prod;
    double D = max(0., B * B - 4 * A * C);
    double x1 = (-B - sqrt(D)) / 2;
    double x2 = (-B + sqrt(D)) / 2;
    p[i] = x1;
    q[i] = x2;
  }
  for (int i = 1; i <= n; ++i)
    printf("%.10f%c", p[i] - p[i - 1], " \n"[i == n]);
  for (int i = 1; i <= n; ++i)
    printf("%.10f%c", q[i] - q[i - 1], " \n"[i == n]);
  return 0;
}
