#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
int main() {
  int n;
  scanf("%d", &n);
  vector<ll> a(n), b(n);
  for (int i = 0; i <= n - 1; i++) scanf("%lld", &a[i]);
  for (int i = 0; i <= n - 1; i++) scanf("%lld", &b[i]);
  ll det = 0;
  multiset<ll> ms;
  for (int i = 0; i <= n - 1; i++) {
    ms.insert(a[i] + det);
    ll res = 0;
    while (!ms.empty()) {
      auto it = ms.begin();
      if (*it - det > b[i]) break;
      ms.erase(it);
      res += *it - det;
    }
    det += b[i];
    res += (ll)((int)ms.size()) * b[i];
    printf("%lld%c", res, i == n - 1 ? '\n' : ' ');
  }
  return 0;
}
