#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:64000000")
using namespace std;
const int MAXN = -1;
const int MOD = 1;
const long double EPS = 1e-11;
long double sqr(long double x) { return x * x; }
bool ok(long double x) { return x >= -EPS && x <= 1 + EPS; }
void norm(long double &x) {
  if (x < 0) x = 0;
  if (x > 1) x = 1;
}
int main() {
  int n;
  while (scanf("%d", &n) == 1) {
    vector<long double> mn(n), mx(n);
    for (int i = 0; i < n; i++) {
      double o;
      scanf("%lf", &o);
      mx[i] = o;
    }
    for (int i = 0; i < n; i++) {
      double o;
      scanf("%lf", &o);
      mn[i] = o;
    }
    vector<double> a(n), b(n);
    long double sa = 0.0, sb = 0.0;
    for (int i = 0; i < n; i++) {
      long double g = mn[i] + mx[i];
      long double A = -1;
      long double B = (sb + g - sa);
      long double C = g * sa - mx[i];
      long double D = B * B - 4 * A * C;
      assert(D >= -EPS);
      D = fabs(D);
      long double na = (-B - sqrt(D)) / (2 * A);
      long double nb = g - na;
      assert(ok(na));
      assert(ok(nb));
      a[i] = na;
      b[i] = nb;
      sa += na;
      sb += nb;
    }
    for (int i = 0; i < n; i++) printf("%.15f%c", a[i], " \n"[i + 1 == n]);
    for (int i = 0; i < n; i++) printf("%.15f%c", b[i], " \n"[i + 1 == n]);
  }
  return 0;
}
