#include <bits/stdc++.h>
using namespace std;
int n;
long long int v[100001], t[100001], pref[100001] = {0}, ans[100002] = {0},
                                    rem[100001] = {0};
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> v[i];
  for (int i = 1; i <= n; i++) {
    cin >> t[i];
    pref[i] = pref[i - 1] + t[i];
  }
  for (int i = 1; i <= n; i++) {
    auto lo = lower_bound(pref + i, pref + n + 1, pref[i - 1] + v[i]) - pref;
    if (lo <= n) {
      if (pref[lo] == (pref[i - 1] + v[i])) {
        ans[i]++;
        ans[lo + 1]--;
      } else {
        rem[lo] += (pref[i - 1] + v[i] - pref[lo - 1]);
        ans[i]++;
        ans[lo]--;
      }
    } else
      ans[i]++;
  }
  long long int el = 0;
  for (int i = 1; i <= n; i++) {
    el = el + ans[i];
    cout << (el * t[i]) + rem[i] << " ";
  }
  cout << endl;
}
