#include <bits/stdc++.h>
using namespace std;
const int maxn = 100003;
int main() {
  int n = 0;
  scanf("%d", &n);
  double P[maxn], Q[maxn];
  for (int i = 0; i < n; i++) {
    scanf("%lf", &P[i]);
  }
  for (int i = 0; i < n; i++) {
    scanf("%lf", &Q[i]);
  }
  double X[maxn], Y[maxn];
  double Pleft = 0, Qleft = 0;
  for (int i = 0; i < n; i++) {
    double sum = P[i] + Q[i];
    double b = Qleft - Pleft - sum;
    double c = (sum * (2 * Qleft - 1) + Q[i] - P[i]) / (-2);
    double delta = b * b - 4 * c;
    delta = delta < 0 ? 0 : delta;
    double y = (sqrt(delta) - b) / 2;
    Y[i] = y;
    X[i] = sum - y;
    Pleft += X[i];
    Qleft += Y[i];
  }
  for (int i = 0; i < n; i++) {
    if (i == n - 1)
      printf("%.6f\n", X[i]);
    else
      printf("%.6f ", X[i]);
  }
  for (int i = 0; i < n; i++) {
    if (i == n - 1)
      printf("%.6f\n", Y[i]);
    else
      printf("%.6f ", Y[i]);
  }
}
