#include <bits/stdc++.h>
using namespace std;
long long v[100005], t[100005];
long long sum[100005];
priority_queue<long long, vector<long long>, greater<long long> > pq;
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &v[i]);
  }
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &t[i]);
    sum[i] = t[i] + sum[i - 1];
  }
  for (int i = 1; i <= n; i++) {
    pq.push(v[i] + sum[i - 1]);
    long long ans = t[i] * pq.size();
    while (!pq.empty() && pq.top() <= sum[i]) {
      ans += pq.top() - sum[i];
      pq.pop();
    }
    if (i != n)
      printf("%lld ", ans);
    else
      printf("%lld\n", ans);
  }
  return 0;
}
