#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
const int maxn = 1e6 + 5;
long long a[maxn];
long long t[maxn];
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 i, j, k, m, n;
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  for (int i = 1; i <= n; ++i) cin >> t[i];
  long long lazy = 0;
  for (int i = 1; i <= n; ++i) {
    q.push(a[i] + lazy);
    long long tpans = 0;
    while (!q.empty() && q.top() - lazy <= t[i]) {
      tpans += q.top() - lazy;
      q.pop();
    }
    tpans += (long long)q.size() * t[i];
    lazy += t[i];
    cout << tpans << " ";
  }
  return 0;
}
