#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
long long a[N], b[N], c[N];
int main() {
  int n;
  while (~scanf("%d", &n)) {
    c[0] = 0;
    for (int i = 1; i <= n; i++) scanf("%lld", &a[i]);
    for (int i = 1; i <= n; i++) scanf("%lld", &b[i]), c[i] = c[i - 1] + b[i];
    long long ans = 0, sum = 0;
    priority_queue<long long, vector<long long>, greater<long long> > q;
    for (int i = 1; i <= n; i++) {
      ans = 0;
      q.push(a[i] + c[i - 1]);
      ans += b[i] * q.size();
      while (!q.empty() && q.top() < c[i]) {
        ans -= c[i] - q.top();
        q.pop();
      }
      printf("%lld ", ans);
    }
    printf("\n");
  }
  return 0;
}
