#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("no-stack-protector")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
using ll = long long;
using ld = long double;
void entry(int testNo);
int main() {
  int testCount = 1;
  if (0) {
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    cin >> testCount;
  } else {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
  }
  for (int i = 0; i < testCount; ++i) {
    entry(i);
    if (0) cout << "----------\n";
  }
}
template <typename... Args>
void readm(Args&... args) {
  ((cin >> args), ...);
}
template <typename... Args>
void readv(int n, Args&... args) {
  for (int i = 0; i < n; ++i) {
    ((cin >> args[i]), ...);
  }
}
template <typename Type>
void printValue(Type value) {
  cout << value << " ";
}
template <typename... Args>
void printc(bool cond, const Args&... args) {
  if (!cond) return;
  ((printValue(args)), ...);
  printValue("\n");
}
void sleepFor() {}
void entry(int testId) {
  int n;
  cin >> n;
  vector<ll> t(n), v(n);
  readv(n, v);
  readv(n, t);
  vector<ll> ans(n);
  multiset<ll> heaps;
  ll offset = 0;
  for (int i = 0; i < n; ++i) {
    heaps.insert(v[i] + offset);
    auto border = heaps.lower_bound(offset + t[i]);
    for (auto it = heaps.begin(); it != border; ++it) {
      ans[i] += (*it - offset);
    }
    heaps.erase(heaps.begin(), border);
    ans[i] += t[i] * heaps.size();
    offset += t[i];
  }
  for (auto x : ans) cout << x << " ";
  cout << endl;
}
