#include <bits/stdc++.h>
using namespace std;
char ch[1000][1000];
int xmov[] = {0, -1, 0, 1};
int ymov[] = {-1, 0, 1, 0};
long long v[100000 + 342], t[100000 + 342];
int main() {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> v[i];
  }
  for (int i = 1; i <= n; i++) {
    cin >> t[i];
  }
  priority_queue<long long, std::vector<long long>, std::greater<long long> >
      pq;
  long long start = 0, cur = 0;
  for (int i = 1; i <= n; i++) {
    long long ans = 0;
    pq.push(v[i] + start);
    cur += t[i];
    if (pq.empty() == 0)
      while (pq.top() <= cur) {
        ans += (pq.top() - start);
        pq.pop();
        if (pq.empty() == true) {
          break;
        }
      }
    ans += t[i] * ((long long)pq.size());
    start += t[i];
    cout << ans << " ";
  }
  return 0;
}
