#include <bits/stdc++.h>
using namespace std;
double a[101000], b[101000], sumy, sumx, x[101000], y[101000], b1, c1, de;
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]);
  for (int i = 1; i <= n; i++) {
    b1 = sumx - sumy - a[i] - b[i];
    c1 = a[i] - (a[i] + b[i]) * sumx;
    de = max(b1 * b1 - 4 * c1, 0.0);
    de = sqrt(de);
    x[i] = (-b1 + de) / 2;
    y[i] = a[i] + b[i] - x[i];
    sumx += x[i];
    sumy += y[i];
  }
  for (int i = 1; i <= n; i++) printf("%f ", x[i]);
  printf("\n");
  for (int i = 1; i <= n; i++) printf("%f ", y[i]);
  printf("\n");
  return 0;
}
