#include <bits/stdc++.h>
using namespace std;
template <int n>
using AI = array<int, n>;
const double eps = 1e-9;
const int oo = 0x3F3F3F3F;
const long long ooLL = 0x3F3F3F3F3F3F3F3FLL;
const int MOD = 1000000007;
template <typename T>
T sqr(T x) {
  return x * x;
}
const double PI = acos(-1.);
long long Round(double x) { return x < 0 ? x - .5 : x + .5; }
int main() {
  void run();
  run();
  return 0;
}
const int N = 1 << 17;
int n;
double a[N], b[N], x[N], y[N];
void run() {
  scanf("%d", &n);
  for (int i = (0), _b(n); i < _b; ++i) scanf("%lf", &x[i]);
  for (int i = (0), _b(n); i < _b; ++i) scanf("%lf", &y[i]);
  for (int i = (0), _b(n); i < _b; ++i) x[i + 1] += x[i];
  for (int i = (n - 1), _b(0); i >= _b; --i) y[i - 1] += y[i];
  for (int i = (0), _b(n); i < _b; ++i) {
    double p = -y[i + 1] + x[i] + 1, q = x[i], d = max(0.0, p * p - 4 * q);
    a[i] = (p + sqrt(d)) / 2;
    b[i] = p - a[i];
    ;
    ;
  }
  for (int i = (0), _b(n); i < _b; ++i)
    printf("%.11lf%c", i ? (a[i] - a[i - 1]) : a[i], "\n "[i + 1 < n]);
  for (int i = (0), _b(n); i < _b; ++i)
    printf("%.11lf%c", i ? (b[i] - b[i - 1]) : b[i], "\n "[i + 1 < n]);
}
