#include <bits/stdc++.h>
using namespace std;
int n;
double x, a[100010], b[100010], s1[100010], s2[100010];
inline 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() {
  scanf("%d", &n);
  for (register int i = 1; i <= n; ++i) {
    scanf("%lf", &x);
    a[i] = a[i - 1] + x;
  }
  for (register int i = 1; i <= n; ++i) {
    scanf("%lf", &x);
    b[i] = b[i - 1] + x;
  }
  for (register int i = 1; i <= n; ++i)
    solve(1.0, -b[i] - a[i], a[i], s1[i], s2[i]);
  for (register int i = 1; i <= n; ++i) printf("%.8lf ", s1[i] - s1[i - 1]);
  putchar('\n');
  for (register int i = 1; i <= n; ++i) printf("%.8lf ", s2[i] - s2[i - 1]);
  return 0;
}
