#include <bits/stdc++.h>
using namespace std;
const long long int mxn = 1e6;
void tc() {
  long long int n;
  cin >> n;
  long long int arr[n];
  for (long long int i = 0; i < n; i++) cin >> arr[i];
  multiset<long long int> m;
  long long int t[n], pre[n];
  for (long long int i = 0; i < n; i++) cin >> t[i], pre[i] = t[i];
  for (long long int i = 1; i < n; i++) pre[i] += pre[i - 1];
  long long int v[n];
  v[0] = arr[0];
  for (long long int i = 1; i < n; i++) v[i] = arr[i] + pre[i - 1];
  long long int time = 0;
  for (long long int i = 0; i < n; i++) {
    m.insert(v[i]);
    time += t[i];
    long long int prv_time = time - t[i];
    auto itr = m.upper_bound(time);
    long long int ans = 0;
    for (auto it = m.begin(); it != itr; it++) ans += (*it - prv_time);
    m.erase(m.begin(), itr);
    ans += m.size() * t[i];
    cout << ans << " ";
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t;
  t = 1;
  while (t--) tc();
}
