#include <bits/stdc++.h>
using namespace std;
long double p[123456];
long double q[123456];
long double mx[123456];
long double mn[123456];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(7);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> mx[i];
  for (int i = 0; i < n; i++) {
    cin >> mn[i];
    mn[i] += mx[i];
  }
  long double pre_p = 0, pre_q = 0;
  for (int i = 0; i < n; i++) {
    long double A = 1;
    long double B = pre_p - pre_q - mn[i];
    long double C = mx[i] - mn[i] * pre_p;
    long double D = B * B - 4 * A * C;
    D = sqrtl(fabsl(D));
    long double S = (-B - D) / 2;
    long double SS = mn[i] - S;
    p[i] = S;
    q[i] = SS;
    pre_p += S;
    pre_q += SS;
  }
  for (int i = 0; i < n; i++) cout << p[i] << " ";
  cout << '\n';
  for (int i = 0; i < n; i++) cout << q[i] << " ";
  cout << '\n';
  return 0;
}
