#include <bits/stdc++.h>
using namespace std;
auto cmp = [](const long long& down, const long long& up) { return down > up; };
int n;
long long created[100000];
long long melted[100000];
priority_queue<long long, vector<long long>, decltype(cmp)> que(cmp);
int main() {
  std::ios_base::sync_with_stdio(false);
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> created[i];
  for (int i = 0; i < n; ++i) cin >> melted[i];
  long long previous_melt = 0;
  for (int day = 0; day < n; ++day) {
    que.push(previous_melt + created[day]);
    long long new_melt = previous_melt + melted[day];
    long long melted_blocks_volume = 0;
    while (!que.empty() && que.top() <= new_melt)
      melted_blocks_volume += que.top() - previous_melt, que.pop();
    cout << melted_blocks_volume + (long long)que.size() * melted[day] << " ";
    previous_melt = new_melt;
  }
  cout << endl;
  return 0;
}
