#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  int n;
  cin >> n;
  long long *a = new long long[n];
  long long *d = new long long[n];
  long long *t = new long long[n];
  long long *s = new long long[n];
  long long *dp = new long long[n];
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    d[i] = 0;
    dp[i] = 0;
  }
  for (int i = 0; i < n; ++i) {
    cin >> t[i];
    if (i) {
      s[i] = s[i - 1] + t[i];
    } else {
      s[i] = t[i];
    }
  }
  for (int i = 0; i < n; ++i) {
    long long l = i - 1, r = n - 1;
    while (r - l > 1) {
      long long m = (l + r) / 2;
      if (s[m] - s[i] + t[i] < a[i]) {
        l = m;
      } else {
        r = m;
      }
    }
    ++l;
    if (s[l] - s[i] + t[i] >= a[i]) {
      d[l]++;
      dp[l] += a[i] - s[l] + s[i] - t[i] + t[l];
    }
  }
  long long *dd = new long long[n];
  dd[0] = d[0];
  for (int i = 1; i < n; ++i) {
    dd[i] = dd[i - 1] + d[i];
  }
  cout << min(a[0], t[0]) << " ";
  for (int i = 1; i < n; ++i) {
    cout << (i + 1 - dd[i - 1] - d[i]) * t[i] + dp[i] << " ";
  }
  return 0;
}
