#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 2E5 + 5;
const long long MOD = 1E9 + 7;
long long n;
long long v[MAXN], t[MAXN];
template <class T>
void read(T& x) {
  x = 0;
  T f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') f = (ch == '-' ? -1 : 1), ch = getchar();
  while (ch >= '0' && ch <= '9') x = x * 10 + ch - 48, ch = getchar();
  x *= f;
}
template <class T, class... Args>
void read(T& x, Args&... args) {
  read(x), read(args...);
}
template <class T>
void write(T x) {
  if (x < 0) putchar('-'), x = -x;
  if (x > 9) write(x / 10);
  putchar(x % 10 + '0');
}
struct VeniceSet {
  multiset<long long> S;
  long long water_level = 0;
  void add(long long v) { S.insert(v + water_level); }
  void remove(long long v) { S.erase(S.find(v + water_level)); }
  void updateAll(long long v) { water_level += v; }
  long long getMin() { return *S.begin() - water_level; }
  long long size() { return S.size(); }
};
signed main() {
  VeniceSet mySet;
  read(n);
  for (long long i = 1; i <= n; i++) read(v[i]);
  for (long long i = 1; i <= n; i++) read(t[i]);
  for (long long i = 1; i <= n; i++) {
    long long ans(0);
    mySet.add(v[i]);
    while (mySet.size() && mySet.getMin() < t[i]) {
      long long tmp = mySet.getMin();
      mySet.remove(tmp);
      ans += tmp;
    }
    printf("%lld ", ans + mySet.size() * t[i]);
    mySet.updateAll(t[i]);
  }
  return 0;
}
