#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
const double eps = 1e-9;
double mi[N], ma[N];
double pre1[N], pre2[N];
double ans1[N], ans2[N];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = (1); i <= (n); i++) cin >> ma[i];
  for (int i = (1); i <= (n); i++) cin >> mi[i];
  for (int i = (1); i <= (n); i++) pre1[i] = pre1[i - 1] + ma[i];
  for (int i = n; i >= 1; i--) pre2[i] = pre2[i + 1] + mi[i];
  for (int i = (1); i <= (n); i++) {
    double t1 = pre2[i + 1] - pre1[i] - 1.0;
    double t3 = t1 * t1 - 4.0 * pre1[i];
    if (t3 < eps) t3 = 0.0;
    t3 = sqrt(t3);
    ans1[i] = 0.5 * (-t1 + t3);
    ans2[i] = 0.5 * (-t1 - t3);
  }
  for (int i = (1); i <= (n); i++) printf("%.9lf ", ans1[i] - ans1[i - 1]);
  puts("");
  for (int i = (1); i <= (n); i++) printf("%.9lf ", ans2[i] - ans2[i - 1]);
  return 0;
}
