#include <bits/stdc++.h>
using namespace std;
priority_queue<long long, vector<long long>, greater<long long>> q;
int a[100005];
int main() {
  int n, x;
  long long b = 0, s;
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &x);
    s = 0;
    q.push(a[i] + b);
    while (!q.empty() && q.top() <= b + x) {
      s += q.top() - b;
      q.pop();
    }
    printf("%I64d ", s + (long long)q.size() * x);
    b += x;
  }
  return 0;
}
