#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e5 + 9;
int n;
double a[MAX], b[MAX], x[MAX], y[MAX], q = 1, p = 1;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%lf", &x[i]);
  for (int i = 0; i < n; i++) scanf("%lf", &y[i]);
  for (int i = 0; i < n; i++) {
    double sum = x[i] + y[i], bb, cc, dd;
    bb = q - p - sum;
    cc = sum * p - y[i];
    dd = max(bb * bb - 4 * 1 * cc, 0.0);
    a[i] = (-bb - sqrt(dd)) / (1 * 2);
    b[i] = sum - a[i];
    p -= a[i], q -= b[i];
  }
  for (int i = 0; i < n; i++) printf("%.8lf ", a[i]);
  printf("\n");
  for (int i = 0; i < n; i++) printf("%.8lf ", b[i]);
}
