#include <bits/stdc++.h>
using namespace std;
double p[100010], q[100010], a[100010], b[100010];
int n;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%lf", &p[i]), p[i] += p[i - 1];
  for (int i = 1; i <= n; ++i) scanf("%lf", &q[i]);
  for (int i = n; i >= 1; --i) q[i] += q[i + 1];
  for (int i = 1; i <= n; ++i) {
    double B = 1 + p[i] - q[i + 1], C = p[i];
    double delta = sqrt(max(B * B - 4 * C, 0.0));
    a[i] = (B + delta) / 2, b[i] = (B - delta) / 2;
  }
  for (int i = 1; i <= n; ++i) printf("%.10lf ", a[i] - a[i - 1]);
  puts("");
  for (int i = 1; i <= n; ++i) printf("%.10lf ", b[i] - b[i - 1]);
  puts("");
}
