#include <bits/stdc++.h>
using namespace std;
double U[100000];
double D[100000];
double S[100000];
double A[100000];
double B[100000];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%lf", U + i);
  for (int i = 0; i < n; i++) scanf("%lf", D + i);
  for (int i = 0; i < n - 1; i++) U[i + 1] += U[i];
  for (int i = n - 1; i > 0; i--) D[i - 1] += D[i];
  for (int i = 0; i < n - 1; i++) S[i] = 1 + U[i] - D[i + 1];
  S[n - 1] = 2;
  for (int i = 0; i < n - 1; i++) {
    double s = S[i];
    double p = U[i];
    double sub_q = s * s - 4 * p;
    double sub = sub_q > 0 ? sqrt(sub_q) : 0.0;
    double a = (s + sub) / 2;
    double b = s - a;
    A[i] = a;
    B[i] = b;
  }
  A[n - 1] = 1;
  B[n - 1] = 1;
  for (int i = 0; i < n - 1; i++) {
    if (A[i + 1] + 1e-10 < A[i] || B[i + 1] + 1e-10 < B[i])
      swap(A[i + 1], B[i + 1]);
  }
  printf("%.15lf ", max(A[0], 0.0));
  for (int i = 0; i < n - 1; i++) printf("%.15lf ", max(A[i + 1] - A[i], 0.0));
  printf("\n");
  printf("%.15lf ", max(B[0], 0.0));
  for (int i = 0; i < n - 1; i++) printf("%.15lf ", max(B[i + 1] - B[i], 0.0));
  printf("\n");
  return 0;
}
