#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) {
    int n;
    cin >> n;
    long long v[n + 1], t[n + 1];
    for (int i = 1; i <= n; i++) cin >> v[i];
    for (int i = 1; i <= n; i++) cin >> t[i];
    vector<long long> pref(n + 1, 0);
    for (int i = 1; i <= n; i++) pref[i] = pref[i - 1] + t[i];
    long long cnt[n + 2], rem[n + 2];
    memset(cnt, 0, sizeof(cnt));
    memset(rem, 0, sizeof(rem));
    for (int i = 1; i <= n; i++) {
      int pos = lower_bound(pref.begin(), pref.end(), v[i] + pref[i - 1]) -
                pref.begin();
      if (pos <= n && pref[pos] - pref[i - 1] == v[i]) {
        cnt[i] += 1;
        cnt[pos + 1] -= 1;
      } else {
        cnt[i] += 1;
        cnt[pos] -= 1;
        rem[pos] += v[i] - (pref[pos - 1] - pref[i - 1]);
      }
    }
    for (int i = 1; i <= n; i++) cnt[i] += cnt[i - 1];
    for (int i = 1; i <= n; i++) {
      long long ans = cnt[i] * t[i] + rem[i];
      cout << ans << " ";
    }
  }
}
