#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9;
const int inf1 = -1 * 1e9;
double EPS = 1e-10;
double a[100005];
double b[100005];
double aa[100005], bb[100005];
double suma[100005];
double sumb[100005];
int main() {
  int n;
  scanf("%d", &(n));
  for (int i = 1; i <= n; i++) scanf("%lf", &a[i]);
  for (int i = 1; i <= n; i++) scanf("%lf", &b[i]);
  suma[0] = 0;
  sumb[0] = 0;
  for (int i = 1; i <= n; i++) {
    double a1 = 1;
    double b1 = sumb[i - 1] - suma[i - 1] - a[i] - b[i];
    double c1 = a[i] - (a[i] + b[i]) * sumb[i - 1];
    double t = max(b1 * b1 - 4.0 * a1 * c1, 0.0);
    bb[i] = (-b1 + sqrt(t)) / (2.0 * a1);
    aa[i] = a[i] + b[i] - bb[i];
    sumb[i] += bb[i] + sumb[i - 1];
    suma[i] += aa[i] + suma[i - 1];
  }
  for (int i = 1; i <= n; i++) {
    printf("%lf ", bb[i]);
  }
  printf("\n");
  for (int i = 1; i <= n; i++) {
    printf("%lf ", aa[i]);
  }
  return 0;
}
