#include <bits/stdc++.h>
using namespace std;
int main() {
  int x;
  cin >> x;
  int vol[x], temp[x];
  priority_queue<long long, vector<long long>, greater<long long> > que;
  for (int i = 0; i < x; i++) {
    cin >> vol[i];
  }
  for (int i = 0; i < x; i++) {
    cin >> temp[i];
  }
  long long var = 0;
  for (int i = 0; i < x; i++) {
    long long co = 0;
    if (vol[i] > temp[i]) {
      vol[i] -= temp[i];
      while (!que.empty()) {
        if (que.top() - var <= temp[i]) {
          co += que.top() - var;
          que.pop();
        } else {
          var += temp[i];
          break;
        }
      }
      co += que.size() * temp[i];
      que.push(vol[i] + var);
      co += temp[i];
    } else {
      while (!que.empty()) {
        if (que.top() - var <= temp[i]) {
          co += que.top() - var;
          que.pop();
        } else {
          var += temp[i];
          break;
        }
      }
      co += que.size() * temp[i];
      co += vol[i];
    }
    cout << co << " ";
  }
}
