#include <bits/stdc++.h>
using namespace std;
struct VeniceSet {
  multiset<long long> s;
  long long waterLevel = 0;
  void insert(long long x) { s.insert(x + waterLevel); }
  void erase(long long x) { s.erase(s.find(x + waterLevel)); }
  void updateAll(long long x) { waterLevel -= x; }
  long long getMin() { return (*s.begin()) - waterLevel; }
  int size() { return s.size(); }
};
int n;
long long t[100005];
VeniceSet vs;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> t[i];
  }
  for (int i = 0; i < n; ++i) {
    long long x;
    cin >> x;
    vs.insert(t[i]);
    long long cres = x * vs.size();
    vs.updateAll(-x);
    while (vs.size() > 0) {
      long long cmi = vs.getMin();
      if (cmi > 0) break;
      vs.erase(cmi);
      cres += cmi;
    }
    cout << cres << " ";
  }
  cout << "\n";
  return 0;
}
