#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<long long> v(n);
  vector<long long> t(n);
  for (int i = 0; i < n; ++i) cin >> v[i];
  for (int i = 0; i < n; ++i) cin >> t[i];
  vector<long long> cur;
  vector<long long> ans(n);
  for (int i = 1; i < n; ++i) t[i] = t[i - 1] + t[i];
  for (int i = 1; i < n; ++i) v[i] += t[i - 1];
  multiset<long long> ms;
  for (int i = 0; i < n; ++i) {
    ms.insert(v[i]);
    if (i != 0)
      ans[i] = (t[i] - t[i - 1]) * ms.size();
    else
      ans[i] = t[i] * ms.size();
    while (!ms.empty() && *ms.begin() - t[i] <= 0) {
      ans[i] -= (t[i] - *ms.begin());
      ms.erase(ms.begin());
    }
  }
  for (int i = 0; i < n; ++i) {
    cout << ans[i] << " ";
  }
}
