#include <bits/stdc++.h>
using namespace std;
int data[100005];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = (0); i < (n); i++) scanf("%d", &data[i]);
  priority_queue<long long, vector<long long>, greater<long long> > Q;
  long long query = 0;
  for (int i = (0); i < (n); i++) {
    long long ans = 0;
    Q.push(query + data[i]);
    int a;
    scanf("%d", &a);
    while (!Q.empty()) {
      long long f = Q.top();
      if (f <= query + a) {
        ans += f - query;
        Q.pop();
      } else {
        ans += 1LL * a * (int)(Q).size();
        break;
      }
    }
    printf("%lld ", ans);
    query += a;
  }
  return 0;
}
