#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void read(T &x) {
  int f = 1;
  char k = getchar();
  x = 0;
  for (; k > '9' || k < '0'; k = getchar())
    if (k == '-') f = -1;
  for (; k >= '0' && k <= '9'; k = getchar()) x = x * 10 + k - '0';
  x *= f;
}
priority_queue<long long, vector<long long>, greater<long long> > s;
int n, tot, v[100005], t[100005];
long long sum[100005];
int main() {
  read(n);
  for (register int i = 1; i <= n; i++) read(v[i]);
  for (register int i = 1; i <= n; i++) {
    read(t[i]);
    sum[i] = sum[i - 1] + t[i];
  }
  for (register int i = 1; i <= n; i++) {
    long long ans = 0;
    s.push(v[i] + sum[i - 1]);
    while (!s.empty() && s.top() <= sum[i])
      ans += s.top() - sum[i - 1], s.pop();
    ans += t[i] * s.size();
    printf("%lld ", ans);
  }
  return 0;
}
