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