#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int tt;
  tt = 1;
  while (tt--) {
    long long int n, i;
    cin >> n;
    long long t[n], s[n];
    vector<long long> ans(n + 3), extra(n + 3);
    for (i = 0; i < n; i++) cin >> s[i];
    for (i = 0; i < n; i++) {
      cin >> t[i];
      if (i) t[i] += t[i - 1];
    }
    for (i = 0; i < n; i++) {
      ans[i]++;
      long long temp = 0, temp1 = 0;
      if (i) temp = t[i - 1];
      int ind = lower_bound(t + i, t + n, temp + s[i]) - t;
      if (ind >= n) ind = n - 1;
      ans[ind]--;
      if (ind) temp1 = t[ind - 1];
      s[i] -= temp1 - temp;
      if (s[i] >= t[ind] - temp1) {
        ans[ind]++;
        ans[ind + 1]--;
      } else {
        extra[ind] += s[i];
      }
    }
    for (i = 1; i < n; i++) ans[i] += ans[i - 1];
    cout << fixed << setprecision(0) << (ans[0] * t[0] + extra[0]) << " ";
    for (i = 1; i < n; i++) {
      cout << fixed << setprecision(0)
           << (ans[i] * (t[i] - t[i - 1]) + extra[i]) << " ";
    }
  }
}
