#include <bits/stdc++.h>
using namespace std;
multiset<long long> e;
long long n, v[200000], a, b;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> v[i];
  for (int i = 0; i < n; i++) {
    long long x, c = 0, d = 0;
    cin >> x;
    e.insert(a + v[i]);
    a += x;
    while (e.size() && *e.begin() < a) {
      c += *e.begin();
      e.erase(e.begin());
      d += b;
    }
    cout << x * e.size() + c - d << " ";
    b += x;
  }
  return 0;
}
