#include <bits/stdc++.h>
using namespace std;
long long oo = (long long)(1e10);
int n;
long long t[(long long)(1e6 + 15)];
long long v[(long long)(1e6 + 15)];
vector<long long> prt;
long long prc[(long long)(1e6 + 15)];
long long ans[(long long)(1e6 + 15)];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr), cout.tie(nullptr);
  cin >> n;
  prt.resize(n + 1, 0);
  for (int i = 1; i <= n; i++) cin >> v[i];
  for (int i = 1; i <= n; i++) {
    cin >> t[i];
    prt[i] = prt[i - 1] + t[i];
  }
  for (int i = 1; i <= n; i++) {
    long long cur = v[i] + prt[i - 1];
    auto it = lower_bound(prt.begin() + i, prt.end(), cur);
    if (it != prt.end()) {
      int dis = (int)(it - (prt.begin() + i));
      prc[i + dis]++;
      ans[i + dis] += t[i + dis] - (prt[i + dis] - cur);
    }
  }
  for (int i = 1; i <= n; i++) {
    prc[i] += prc[i - 1];
    ans[i] += (i - prc[i]) * t[i];
  }
  for (int i = 1; i <= n; i++) cout << ans[i] << " ";
  cout << endl;
  return 0;
}
