#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3f;
const int MOD = (int)1e9 + 7;
const int N = (int)1e5 + 7;
int n;
double mx[N], mi[N];
double a[N], b[N];
void Init() {
  for (int i = (1); i < (n + 1); ++i) scanf("%lf", mx + i);
  for (int i = (1); i < (n + 1); ++i) scanf("%lf", mi + i);
}
int Solve() {
  double suma = 0, sumb = 0;
  for (int i = (1); i < (n + 1); ++i) {
    double A = 1;
    double B = sumb - suma - mx[i] - mi[i];
    double C = -(mx[i] + mi[i]) * sumb + mx[i];
    b[i] = (-B + sqrt(max(0.0, B * B - 4 * A * C))) / (2 * A);
    a[i] = mx[i] + mi[i] - b[i];
    suma += a[i];
    sumb += b[i];
  }
  for (int i = (1); i < (n + 1); ++i) printf("%.7f%c", a[i], " \n"[i == n]);
  for (int i = (1); i < (n + 1); ++i) printf("%.7f%c", b[i], " \n"[i == n]);
  return 0;
}
int main() {
  while (~scanf("%d", &n)) {
    Init();
    Solve();
  }
  return 0;
}
