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