#include <bits/stdc++.h>
using namespace std;
int sn[100000], wt[100000];
multiset<long long> S;
int main() {
  int n, i;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", sn + i);
  }
  for (i = 0; i < n; i++) {
    scanf("%d", wt + i);
  }
  S.clear();
  long long rmv = 0, cnt = 0;
  for (i = 0; i < n; i++) {
    S.insert(sn[i] + rmv);
    auto t1 = S.lower_bound(rmv);
    auto t2 = S.lower_bound(rmv + wt[i]);
    long long ans = 0;
    for (; t1 != t2; t1++) {
      ans += (*t1) - rmv;
      cnt++;
    }
    ans += (S.size() - cnt) * wt[i];
    printf("%lld%c", ans, i == n - 1 ? '\n' : ' ');
    rmv += wt[i];
  }
  return 0;
}
