#include <bits/stdc++.h>
using namespace std;
int n;
double Max[100010], Min[100010], s[100010], t[100010];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%lf", &Max[i]);
  for (int i = 1; i <= n; i++) scanf("%lf", &Min[i]);
  for (int i = 1; i <= n; i++) Max[i] += Max[i - 1];
  for (int i = n; i >= 1; i--) Min[i] += Min[i + 1];
  for (int i = 1; i <= n; i++) {
    double val = 1.0 - Min[i + 1] + Max[i];
    double delta = val * val - 4.0 * Max[i];
    s[i] = (val + sqrt(delta < 0 ? -delta : delta)) / 2.0;
    t[i] = val - s[i];
  }
  for (int i = 1; i <= n; i++) printf("%0.10f ", s[i] - s[i - 1]);
  cout << endl;
  for (int i = 1; i <= n; i++) printf("%0.10f ", t[i] - t[i - 1]);
  return 0;
}
