#include <bits/stdc++.h>
using namespace std;
int N;
double p = 1, q = 1;
double a[100005], b[100005];
double x[100005], y[100005];
inline int read_int() {
  register int ret = 0, f = 1;
  register char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    ret = (ret << 1) + (ret << 3) + int(c - 48);
    c = getchar();
  }
  return ret * f;
}
inline void init() {
  N = read_int();
  for (register int i = 1; i <= N; i++) scanf("%lf", &x[i]);
  for (register int i = 1; i <= N; i++) scanf("%lf", &y[i]);
}
inline void dp() {
  for (register int i = 1; i <= N; i++) {
    double sum = x[i] + y[i];
    double bb, c, d;
    bb = q - p - sum;
    c = sum * p - y[i];
    d = max(bb * bb - 4 * c, 0.0);
    a[i] = -(bb - sqrt(d)) / 2;
    b[i] = sum - a[i];
    p -= a[i], q -= b[i];
  }
  for (register int i = 1; i <= N; i++) printf("%.8lf ", a[i]);
  printf("\n");
  for (register int i = 1; i <= N; i++) printf("%.8lf ", b[i]);
  printf("\n");
}
int main() {
  init();
  dp();
  return 0;
}
