#include <bits/stdc++.h>
using namespace std;
double ma[100010];
double mi[100010];
double ans1[100010];
double ans2[100010];
void solve(double a, double b, double c, double &x, double &y) {
  x = (-b - sqrt(fabs(b * b - 4 * a * c))) / (2 * a);
  y = (-b + sqrt(fabs(b * b - 4 * a * c))) / (2 * a);
  if (x > y) swap(x, y);
}
int main() {
  int n;
  scanf("%d", &n);
  double p, q;
  for (int i = 1; i <= n; i++) {
    scanf("%lf", &p);
    ma[i] = ma[i - 1] + p;
  }
  for (int i = 1; i <= n; i++) {
    scanf("%lf", &q);
    mi[i] = mi[i - 1] + q;
  }
  for (int i = 1; i <= n; i++) {
    solve(1.0, -mi[i] - ma[i], ma[i], ans1[i], ans2[i]);
  }
  for (int i = 1; i <= n; i++) {
    printf("%.8lf ", ans1[i] - ans1[i - 1]);
  }
  printf("\n");
  for (int i = 1; i <= n; i++) {
    printf("%.8lf ", ans2[i] - ans2[i - 1]);
  }
  return 0;
}
