#include <bits/stdc++.h>
using namespace std;
const int NMAX = 100005;
long long v[NMAX];
priority_queue<long long, vector<long long>, greater<long long> > q;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> v[i];
  long long s = 0;
  for (int i = 1; i <= n; i++) {
    q.push(s + v[i]);
    long long x;
    cin >> x;
    s += x;
    long long sol = 0;
    while (q.size() && s >= q.top()) {
      sol += (q.top() - s + x);
      q.pop();
    }
    sol += (x * q.size());
    cout << sol << " ";
  }
  return 0;
}
