#include <bits/stdc++.h>
using namespace std;
long long mul(long long a, long long b) { return (a * b) % (100000007); }
long long add(long long a, long long b) { return (a + b) % (100000007); }
long long sub(long long a, long long b) {
  return (a - b + llabs(a - b) / (100000007) * (100000007) + (100000007)) %
         (100000007);
}
void upd(long long &a, long long b) {
  a = (a % (100000007) + b % (100000007)) % (100000007);
}
int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
double a[(100010)], b[(100010)];
double p[(100010)], q[(100010)];
int main() {
  int n = read();
  b[0] = a[n + 1] = 0;
  a[0] = b[n + 1] = 1;
  for (int i = 1; i <= n; i++) cin >> b[i];
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = n - 1; i; i--) a[i] += a[i + 1];
  for (int i = 2; i <= n; i++) b[i] += b[i - 1];
  for (int i = 1; i <= n; i++) {
    double c = 1 + b[i] - a[i + 1], d = b[i];
    double del = sqrt(abs(c * c - 4 * d));
    double x1 = (c + del) / 2, x2 = (c - del) / 2;
    p[i] = x1, q[i] = x2;
  }
  for (int i = 1; i <= n; i++) printf("%.10lf ", p[i] - p[i - 1]);
  puts("");
  for (int i = 1; i <= n; i++) printf("%.10lf ", q[i] - q[i - 1]);
  return 0;
}
