#include <bits/stdc++.h>
using namespace std;
int n;
double mx[100010], mn[100010];
double a[100010], b[100010];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%lf", mx + i);
    mx[i] += mx[i - 1];
  }
  for (int i = 1; i <= n; i++) {
    scanf("%lf", mn + i);
    mn[i] += mn[i - 1];
  }
  for (int i = 1; i <= n; i++) {
    a[i] = (mx[i] + mn[i] -
            pow(max(0.0, pow(mx[i] + mn[i], 2.0) - 4.0 * mx[i]), 0.5)) /
           2.0;
    b[i] = (mx[i] + mn[i] +
            pow(max(0.0, pow(mx[i] + mn[i], 2.0) - 4.0 * mx[i]), 0.5)) /
           2.0;
  }
  for (int i = 1; i <= n; i++) printf("%lf ", a[i] - a[i - 1]);
  puts("");
  for (int i = 1; i <= n; i++) printf("%lf ", b[i] - b[i - 1]);
  return 0;
}
