#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long int n;
  cin >> n;
  vector<long long int> V(n + 1), T(n + 1), tsum(n + 1, 0);
  for (long long int i = 1; i <= n; i++) {
    cin >> V[i];
  }
  for (long long int i = 1; i <= n; i++) {
    cin >> T[i];
    tsum[i] = T[i] + tsum[i - 1];
  }
  map<long long int, long long int> mp;
  vector<long long int> ans(n + 1, 0);
  for (long long int i = 1; i <= n; i++) {
    long long int x =
        lower_bound(tsum.begin(), tsum.end(), V[i] + tsum[i - 1]) -
        tsum.begin();
    if (x <= n) {
      mp[x] += min(V[i] + tsum[i - 1] - tsum[x], 0LL);
    }
    x = min(x, n);
    ans[x]++;
    ans[i - 1]--;
  }
  for (long long int i = n - 1; i >= 0; i--) {
    ans[i] += ans[i + 1];
  }
  for (long long int i = 1; i <= n; i++) {
    ans[i] *= T[i];
  }
  for (auto x : mp) {
    ans[x.first] += x.second;
  }
  for (long long int i = 1; i <= n; i++) cout << ans[i] << " ";
  return 0;
}
