#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e5 + 7;
int n;
long double mx[N], mn[N], pref_a[N], pref_b[N];
int sgn(long double x) {
  if (x > 0) return 1;
  return -1;
}
signed main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> mx[i];
  }
  for (int i = 1; i <= n; i++) {
    cin >> mn[i];
  }
  for (int i = 1; i <= n; i++) mx[i] += mx[i - 1];
  for (int i = n; i >= 1; i--) mn[i] += mn[i + 1];
  for (int i = 1; i <= n; i++) {
    long double s = 1 + mx[i] - mn[i + 1];
    long double p = mx[i];
    long double delta = s * s - 4 * p;
    if (delta < 0) delta = 0;
    long double x1 = (s - sqrt(delta)) / 2;
    long double x2 = (s + sqrt(delta)) / 2;
    pref_a[i] = x2;
    pref_b[i] = s - pref_a[i];
  }
  for (int i = 1; i <= n; i++) {
    cout << pref_a[i] - pref_a[i - 1] << " ";
  }
  cout << "\n";
  for (int i = 1; i <= n; i++) {
    cout << pref_b[i] - pref_b[i - 1] << " ";
  }
  cout << "\n";
  return 0;
}
