#include <bits/stdc++.h>
using namespace std;
long long v[100010], t[100010], p[100010], ansp[100010], ans[100010], n;
long long sum(long I, long J) {
  if (I == 0) return p[J];
  return (p[J] - p[I - 1]);
}
long long BinPow(long ind) {
  long l = 0, r = n - ind + 1;
  while (r - l > 1) {
    long m = (r + l) / 2;
    if (sum(ind, ind + m - 1) > v[ind])
      r = m;
    else
      l = m;
  }
  ans[ind + l] += v[ind] - sum(ind, ind + l - 1);
  if (sum(ind, ind + l - 1) <= v[ind]) {
    if (ind > 0) ansp[ind - 1] -= 1;
    ansp[ind + l - 1] += 1;
  }
  return l;
}
int main() {
  cin >> n;
  for (long i = 0; i < n; i++) cin >> v[i];
  for (long j = 0; j < n; j++) cin >> t[j];
  p[0] = t[0];
  for (long i = 1; i < n; i++) p[i] = p[i - 1] + t[i];
  for (long i = 0; i < n; i++) {
    BinPow(i);
  }
  long cur = 0;
  for (long i = n - 1; i >= 0; i--) {
    cur += ansp[i];
    ans[i] += cur * t[i];
  }
  for (long i = 0; i < n; i++) cout << ans[i] << ' ';
  cout << '\n';
  return 0;
}
