#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const double PI = 3.1415926535897;
long long tt[400400], a[400400], t[400400], p[400400], ans[400400];
void build(int v, int tl, int tr) {
  if (tl == tr)
    tt[v] = 0;
  else {
    int tm = (tl + tr) / 2;
    build(v * 2, tl, tm);
    build(v * 2 + 1, tm + 1, tr);
    tt[v] = 0;
  }
}
void update(int v, int tl, int tr, int l, int r) {
  if (l > r) return;
  if (tl == l && tr == r)
    tt[v]++;
  else {
    int 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 findn(int v, int tl, int tr, int pos) {
  if (tl == tr) return tt[v];
  int tm = (tl + tr) / 2;
  if (pos <= tm)
    return tt[v] + findn(v * 2, tl, tm, pos);
  else
    return tt[v] + findn(v * 2 + 1, tm + 1, tr, pos);
}
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) cin >> t[i];
  p[0] = t[0];
  for (int i = 1; i < n; i++) p[i] = p[i - 1] + t[i];
  for (int i = 0; i <= n; i++) ans[i] = 0;
  build(1, 0, n - 1);
  for (int i = 0; i < n; i++) {
    long long ost = 0;
    if (i) ost = p[i - 1];
    int l = i, r = n - 1;
    while (l != r) {
      int tm = (l + r) / 2;
      if (p[tm] - ost >= a[i])
        r = tm;
      else
        l = tm + 1;
    }
    if (p[l] - ost < a[i]) l++;
    long long ss = 0;
    if (l) ss = p[l - 1];
    ans[l] += a[i] - ss + ost;
    update(1, 0, n - 1, i, l - 1);
  }
  for (int i = 0; i < n; i++) {
    long long res = findn(1, 0, n - 1, i) * 1ll * t[i];
    res += ans[i];
    cout << res << " ";
  }
  return 0;
}
