#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
long long n, a[100002], b[100002], sum[100002];
priority_queue<long long, vector<long long>, greater<long long> > q;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) {
    cin >> b[i];
    sum[i] = sum[i - 1] + b[i];
  }
  for (int i = 1; i <= n; i++) {
    long long ans = 0;
    q.push(a[i] + sum[i - 1]);
    while (!q.empty() && q.top() <= sum[i]) {
      ans += q.top() - sum[i - 1];
      q.pop();
    }
    ans += q.size() * b[i];
    cout << ans << " ";
  }
  return 0;
}
