#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int t = 1;
  while (t--) {
    long long i, j, k, n;
    cin >> n;
    long long a[n], b[n];
    for (i = 0; i < n; i++) cin >> a[i];
    cin >> b[0];
    for (i = 1; i < n; i++) {
      cin >> b[i];
      b[i] += b[i - 1];
    }
    vector<long long> res(n + 2, 0), res1(n + 2, 0);
    for (i = 0; i < n; i++) {
      long long last = 0;
      if (i > 0) last = b[i - 1];
      long long x = lower_bound(b, b + n, a[i] + last) - b;
      x--;
      res[x + 1]--;
      res[i]++;
      long long last1 = 0;
      if (x >= 0) last1 = b[x];
      res1[x + 1] += min(b[x + 1] - last1, a[i] + last - last1);
    }
    for (i = 1; i < n; i++) res[i] += res[i - 1];
    for (i = 0; i < n; i++) {
      long long x = 0;
      if (i > 0) x = b[i - 1];
      res[i] *= b[i] - x;
    }
    for (i = 0; i < n; i++) cout << res[i] + res1[i] << " ";
  }
}
