#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  long long n;
  cin >> n;
  vector<long long> v(n), t(n);
  for (long long i = 0; i < n; i++) cin >> v[i];
  for (long long i = 0; i < n; i++) cin >> t[i];
  multiset<long long> x;
  long long T = 0, curT = 0;
  for (long long i = 0; i < n; i++) {
    long long ans = 0;
    x.insert(v[i] + T);
    curT = T + t[i];
    while (x.size() && (*x.begin()) <= curT) {
      ans += (*x.begin()) - T;
      x.erase(x.begin());
    }
    ans += 1LL * x.size() * 1LL * t[i];
    T = curT;
    cout << ans << ' ';
  }
  cout << endl;
  return 0;
}
