#include <bits/stdc++.h>
using namespace std;
struct snow {
  long long cnt, in, val;
  snow() : cnt(0), val(0) {}
};
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<snow> t(n);
  vector<long long> v(n), sumt(n);
  for (int i = 0; i < n; ++i) {
    cin >> v[i];
  }
  long long temp = 0;
  for (int i = 0; i < n; ++i) {
    cin >> t[i].in;
    sumt[i] = t[i].in + temp;
    temp = sumt[i];
  }
  t.push_back(snow());
  sumt.push_back(1e18);
  long long prev = 0;
  for (int i = 0; i < n; ++i) {
    auto it = upper_bound(sumt.begin(), sumt.end(), v[i] + prev);
    int l = i, r = it - sumt.begin();
    if (r > 0)
      temp = sumt[r - 1];
    else
      temp = 0;
    t[r].val += max<long long>((v[i] + prev) - temp, 0);
    if (l <= r) {
      ++t[l].cnt;
      --t[r].cnt;
    }
    prev = sumt[i];
  }
  long long d = 0;
  for (int i = 0; i < n; ++i) {
    d += t[i].cnt;
    t[i].val += t[i].in * d;
  }
  for (int i = 0; i < n; ++i) cout << t[i].val << " ";
  cout << "\n";
  return 0;
}
