#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int n;
double prea[maxn], sufb[maxn];
double sum1[maxn], sum2[maxn];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    double x;
    scanf("%lf", &x);
    prea[i] = prea[i - 1] + x;
  }
  for (int i = 1; i <= n; i++) scanf("%lf", &sufb[i]);
  for (int i = n; i >= 1; i--) sufb[i] += sufb[i + 1];
  for (int i = 1; i <= n; i++) {
    double aa = 1;
    double bb = -(1 + prea[i] - sufb[i + 1]);
    double cc = prea[i];
    double delta = max(0.0, bb * bb - 4 * aa * cc);
    sum1[i] = (-bb - sqrt(delta)) / (2 * aa);
    sum2[i] = (-bb + sqrt(delta)) / (2 * aa);
  }
  for (int i = 1; i <= n; i++)
    printf("%.12f%c", sum1[i] - sum1[i - 1], i == n ? '\n' : ' ');
  for (int i = 1; i <= n; i++)
    printf("%.12f%c", sum2[i] - sum2[i - 1], i == n ? '\n' : ' ');
  return 0;
}
