#include <bits/stdc++.h>
using namespace std;
const double eps = 1E-12;
const int MAXN = 1000100;
int n;
double mx[MAXN], mn[MAXN];
double a[MAXN], b[MAXN], suma = 0.0, sumb = 0.0;
double solve(double A, double B, double C) {
  double D = B * B - 4 * A * C;
  if (D < -eps) {
    assert(false);
  }
  D = max(0.0, D);
  return (-B + sqrt(D)) / (2.0 * A);
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    scanf("%lf", &mx[i]);
  }
  for (int i = 1; i <= n; i++) {
    scanf("%lf", &mn[i]);
  }
  for (int i = 1; i <= n; i++) {
    double d = mx[i] + mn[i];
    b[i] = solve(1.0, -d + sumb - suma, mx[i] - d * sumb);
    a[i] = d - b[i];
    suma += a[i];
    sumb += b[i];
  }
  for (int i = 1; i <= n; i++) {
    printf("%.15lf ", a[i]);
  }
  printf("\n");
  for (int i = 1; i <= n; i++) {
    printf("%.15lf ", b[i]);
  }
  printf("\n");
  return 0;
}
