#include <bits/stdc++.h>
using namespace std;
double a1[100000], a2[100000];
double f1[100000], f2[100000];
int main() {
  int q, w, e, r, t;
  scanf("%d", &q);
  for (w = 0; w < q; w++) {
    scanf("%lf", &a1[w]);
  }
  for (w = 0; w < q; w++) {
    scanf("%lf", &a2[w]);
  }
  long double y1 = 0, y2 = 0;
  long double A1, A2, D, S1, S2;
  for (w = q - 1; w >= 0; w--) {
    A1 = a1[w];
    A2 = a2[w];
    A1 += A2;
    S1 = y1 - A1 - y2;
    S2 = A2 - y1 * A1;
    D = S1 * S1 - 4 * S2;
    D = sqrt(max(D, (long double)0));
    f1[w] = (-S1 + D) / 2;
    f2[w] = A1 - f1[w];
    y1 += f1[w];
    y2 += f2[w];
  }
  for (w = 0; w < q; w++) {
    printf("%.7lf ", f1[w]);
  }
  printf("\n");
  for (w = 0; w < q; w++) {
    printf("%.7lf ", f2[w]);
  }
  return 0;
}
