#include <bits/stdc++.h>
using namespace std;
int n;
double Max[100010], Min[100010], sMax[100010], sMin[100010], A[100010],
    B[100010], SA[100010], SB[100010];
bool check(double a, double b, int k) {
  if (a < SA[k - 1] - 1e-9) return false;
  if (b < SB[k - 1] - 1e-9) return false;
  if (fabs(a - SA[k - 1]) <= 1e-9) a = SA[k - 1];
  if (fabs(b - SB[k - 1]) <= 1e-9) b = SB[k - 1];
  A[k] = a - SA[k - 1];
  B[k] = b - SB[k - 1];
  SA[k] = a;
  SB[k] = b;
  return true;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(NULL);
  cin >> n;
  for (int i = (1); i <= (n); i++) cin >> Max[i];
  for (int i = (1); i <= (n); i++) cin >> Min[i];
  for (int i = (1); i <= (n); i++) sMax[i] = sMax[i - 1] + Max[i];
  for (int i = (n); i >= (1); i--) sMin[i] = sMin[i + 1] + Min[i];
  for (int k = (1); k <= (n); k++) {
    double x = sMax[k];
    double y = sMin[k + 1];
    y = 1 + x - y;
    double delta = y * y - 4 * x;
    if (delta < 0) delta = 0;
    delta = sqrt(delta);
    double b = (y + delta) / 2;
    double a = y - b;
    if (!check(a, b, k)) {
      b = (y - delta) / 2;
      a = y - b;
      check(a, b, k);
    }
  }
  for (int i = (1); i <= (n); i++)
    cout << fixed << setprecision(9) << A[i] << " ";
  cout << endl;
  for (int i = (1); i <= (n); i++)
    cout << fixed << setprecision(9) << B[i] << " ";
  return 0;
}
