#include <bits/stdc++.h>
using namespace std;
const long long N = 7e5 + 51, MOD = 1e9 + 7, mod = 998244353, INF = 2e18;
mt19937 Flash_new_51(51515);
using vi = vector<long long>;
using vp = vector<pair<long long, long long>>;
long double a[N], b[N], ans[2][N];
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (long long j = 0; j < n; j++) {
    cin >> b[j];
  }
  long double sum1 = 0, sum2 = 0;
  for (long long i = 0; i < n; i++) {
    long double x = b[i] + a[i];
    long double C = sum1 * x - a[i];
    long double B = sum2 - sum1 + x, A = -1.0;
    long double D = abs(sqrt(abs(B * B - 4.0 * A * C)));
    long double X1 = (-B + D) / (2.0 * A), X2 = (-B - D) / (2.0 * A);
    if (X2 > X1) {
      swap(X1, X2);
    }
    ans[0][i] = X1;
    ans[1][i] = x - X1;
    sum1 += abs(ans[0][i]);
    sum2 += abs(ans[1][i]);
  }
  for (long long i = 0; i <= 1; i++) {
    for (long long j = 0; j < n; j++) {
      cout << setprecision(30) << fixed << abs(ans[i][j]) << ' ';
    }
    cout << "\n";
  }
}
