#include <bits/stdc++.h>
using namespace std;
const int inf = 1000000000;
const long long INF = 1LL * inf * inf;
const double eps = 1e-9;
const int MAXN = 2500;
const int md = (int)1e9 + 7;
int n;
double x[200000], y[200000], a[200000], b[200000], suma, sumb;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%lf", &x[i]);
  for (int i = 1; i <= n; i++) scanf("%lf", &y[i]);
  for (int i = 1; i <= n; i++) {
    double bb = suma + x[i] + y[i] - sumb;
    double disc = max(0.0, bb * bb + 4 * sumb * (x[i] + y[i]) - 4 * x[i]);
    b[i] = (bb + sqrt(disc)) / 2;
    a[i] = x[i] + y[i] - b[i];
    suma += a[i];
    sumb += b[i];
  }
  for (int i = 1; i <= n; i++) cout << fixed << setprecision(10) << a[i] << " ";
  cout << "\n";
  for (int i = 1; i <= n; i++) cout << fixed << setprecision(10) << b[i] << " ";
  return 0;
}
