#include <bits/stdc++.h>
using namespace std;
const long long maxn = 100010;
long long n, v[maxn], t[maxn], Add, ans;
priority_queue<long long, vector<long long>, greater<long long> > q;
int main() {
  scanf("%I64d", &n);
  for (long long i = 1; i <= n; i++) scanf("%I64d", &v[i]);
  for (long long i = 1; i <= n; i++) scanf("%I64d", &t[i]);
  for (long long i = 1; i <= n; i++) {
    ans = 0;
    q.push(v[i] + Add);
    Add += t[i];
    while (!q.empty() && q.top() <= Add) {
      ans += q.top() - (Add - t[i]);
      q.pop();
    }
    ans += t[i] * q.size();
    printf("%I64d ", ans);
  }
  return 0;
}
