#include <bits/stdc++.h>
using namespace std;
long double pmax[100001], pmin[100001], A[100001], a[100001];
int main() {
  int n;
  scanf("%d", &n);
  long double sigmaaj = 0.0, sigmaAj = 0.0;
  for (int i = 1; i <= n; ++i) scanf("%Lf", pmax + i);
  for (int i = 1; i <= n; ++i) {
    scanf("%Lf", pmin + i);
    A[i] = pmax[i] + pmin[i];
    sigmaAj += A[i];
    long double b = 2.0 * sigmaaj - sigmaAj, c = pmax[i] - A[i] * sigmaaj;
    long double delta = b * b - 4.0 * c;
    if (delta < 0.0) delta = 0.0;
    a[i] = (-b + sqrt(delta)) / 2.0;
    printf("%Lf ", a[i]);
    sigmaaj += a[i];
  }
  printf("\n");
  for (int i = 1; i <= n; ++i) printf("%Lf ", pmax[i] + pmin[i] - a[i]);
  return 0;
}
