#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7;
const double EPS = 1e-13;
double pre[100005], suf[100005];
pair<double, double> ans[100005];
pair<double, double> getsol(double xy, double rxy) {
  double a = -1.0, b = xy + 1.0 - rxy, c = -xy;
  double d = sqrt(b * b - a * c * 4.0 + EPS);
  return make_pair((-b - d) / (a + a), (-b + d) / (a + a));
}
int main() {
  int n;
  scanf("%d", &n);
  for (int k = 0; k < (n); k++) scanf("%lf", &pre[k]);
  for (int k = 1; k < n; k++) pre[k] += pre[k - 1];
  for (int k = 0; k < (n); k++) scanf("%lf", &suf[k]);
  for (int k = n - 2; k >= 0; k--) suf[k] += suf[k + 1];
  for (int k = 0; k < (n - 1); k++) ans[k] = getsol(pre[k], suf[k + 1]);
  ans[n - 1].first = 1.0;
  ans[n - 1].second = 1.0;
  for (int k = n - 2; k >= 0; k--) {
    ans[k + 1].first -= ans[k].first;
    ans[k + 1].second -= ans[k].second;
  }
  for (int k = 0; k < (n); k++)
    printf("%.7lf%c", ans[k].second, k == n - 1 ? '\n' : ' ');
  for (int k = 0; k < (n); k++)
    printf("%.7lf%c", ans[k].first, k == n - 1 ? '\n' : ' ');
  return 0;
}
