#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 999;
const long long ll_inf = 1e18 + 1337;
vector<long long> tree;
void build(long long v, long long tl, long long tr) {
  if (tl == tr)
    tree[v] = 0;
  else {
    long long tm = (tl + tr) / 2;
    build(v * 2, tl, tm);
    build(v * 2 + 1, tm + 1, tr);
  }
}
void update(long long v, long long tl, long long tr, long long l, long long r) {
  if (l > r) return;
  if (tl == l && tr == r)
    tree[v] += 1;
  else {
    long long tm = (tl + tr) / 2;
    update(v * 2, tl, tm, l, min(tm, r));
    update(v * 2 + 1, tm + 1, tr, max(l, tm + 1), r);
  }
}
long long get(long long v, long long tl, long long tr, long long pos) {
  if (tl == tr)
    return tree[v];
  else {
    long long tm = (tl + tr) / 2;
    if (pos <= tm)
      return tree[v] + get(v * 2, tl, tm, pos);
    else
      return tree[v] + get(v * 2 + 1, tm + 1, tr, pos);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long n, m, q;
  cin >> n;
  tree.resize(4 * n);
  build(1, 1, n);
  vector<long long> v(n + 1), T(n + 1), pr(n + 1);
  v[0] = T[0] = pr[0] = 0;
  for (int i = 1; i <= n; ++i) cin >> v[i];
  for (int i = 1; i <= n; ++i) {
    cin >> T[i];
    pr[i] = pr[i - 1] + T[i];
  }
  vector<long long> ans(n + 1, 0);
  for (int i = 1; i <= n; ++i) {
    int l = i, r = (int)(upper_bound(pr.begin(), pr.end(), pr[i - 1] + v[i]) -
                         pr.begin());
    if (l != r) update(1, 1, n, l, r - 1);
    if (r <= n) ans[r] += v[i] - (pr[r - 1] - pr[i - 1]);
  }
  for (int i = 1; i <= n; ++i) {
    ans[i] += T[i] * get(1, 1, n, i);
    cout << ans[i] << " ";
  }
  cout << endl;
  return 0;
}
