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