#include <bits/stdc++.h>
using namespace std;
const int oo = 10e5 + 1;
vector<long long> v(oo), t(oo);
priority_queue<long long, vector<long long>, greater<long long> > q;
void solution() {
  long long n;
  cin >> n;
  for (long long i = (1); i < (n + 1); i++) cin >> v[i];
  for (long long i = (1); i < (n + 1); i++) cin >> t[i];
  long long ct = 0;
  for (int i = 1; i <= n; ct += t[i], ++i) {
    long long ans = 0;
    q.push(v[i] + ct);
    while (!q.empty() && q.top() <= t[i] + ct) ans += q.top() - ct, q.pop();
    ans += q.size() * t[i];
    cout << ans << " ";
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solution();
  return 0;
}
