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