#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 100;
long long a[maxn], b[maxn], sum[maxn];
priority_queue<long long, vector<long long>, greater<long long> > q;
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= n; i++) {
    cin >> b[i];
    sum[i] = b[i] + sum[i - 1];
  }
  long long ans;
  q.push(a[1]);
  if (q.top() <= b[1]) {
    ans = q.top();
    q.pop();
  } else {
    ans = b[1];
  }
  cout << ans;
  for (int i = 2; i <= n; i++) {
    ans = 0;
    q.push(a[i] + sum[i - 1]);
    while (!q.empty() && q.top() <= sum[i]) {
      ans += q.top() - sum[i - 1];
      q.pop();
    }
    ans += b[i] * q.size();
    cout << " " << ans;
  }
  return 0;
}
