#include <bits/stdc++.h>
using namespace std;
const int MX = 100005;
double A[MX], B[MX];
double x[MX], y[MX];
int main() {
  int n;
  ignore = scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    ignore = scanf("%lf", A + i);
    A[i] += A[i - 1];
  }
  for (int i = 1; i <= n; i++) {
    ignore = scanf("%lf", B + i);
  }
  for (int i = n; i >= 1; i--) {
    B[i] += B[i + 1];
  }
  for (int i = 1; i <= n; i++) {
    double a = A[i];
    double b = 1.0 + A[i] - B[i + 1];
    double D = b * b - 4.0 * a;
    if (D < 1e-18) D = 1e-18;
    D = sqrt(D);
    x[i] = (b - D) / 2.0;
    y[i] = (b + D) / 2.0;
  }
  for (int i = 1; i <= n; i++) {
    printf("%.15lf ", x[i] - x[i - 1]);
  }
  printf("\n");
  for (int i = 1; i <= n; i++) {
    printf("%.15lf ", y[i] - y[i - 1]);
  }
  printf("\n");
}
