#include <bits/stdc++.h>
using namespace std;
int n;
double g[1000005], h[1000005], x[1000005], y[1000005];
int main() {
  std::ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> g[i], g[i] += g[i - 1];
  for (int i = 1; i <= n; i++) cin >> h[i];
  for (int i = n; i > 0; i--) h[i] += h[i + 1];
  for (int i = 1; i <= n; i++) {
    double a = 1, b = -(1 + g[i] - h[i + 1]), c = g[i];
    double d = max(b * b - 4 * a * c, 0.0);
    x[i] = (-b - sqrt(d)) / (2 * a);
    y[i] = (-b + sqrt(d)) / (2 * a);
  }
  for (int i = 1; i <= n; i++) cout << x[i] - x[i - 1] << " ";
  cout << endl;
  for (int i = 1; i <= n; i++) cout << y[i] - y[i - 1] << " ";
  return 0;
}
