#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
long long v[maxn];
long long t[maxn];
long long sum[maxn];
int n;
struct cmp {
  bool operator()(const long long a, const long long b) const { return a > b; }
};
priority_queue<long long, vector<long long>, cmp> q;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &v[i]);
  }
  sum[0] = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &t[i]);
    sum[i] = t[i] + sum[i - 1];
    q.push(v[i] + sum[i - 1]);
    long long ans = t[i] * q.size();
    while (!q.empty() && q.top() <= sum[i]) {
      long long now = q.top();
      ans = ans + (now - sum[i]);
      q.pop();
    }
    printf("%lld ", ans);
  }
  return 0;
}
