#include <bits/stdc++.h>
using namespace std;
const int N = 1000020;
long long n, v[N], t[N], d[N], add[N], ans[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> v[i];
  }
  for (int i = 1; i <= n; ++i) {
    cin >> t[i];
    t[i] += t[i - 1];
  }
  for (int i = 1; i <= n; ++i) {
    int l = i, r = n;
    while (r - l > 1) {
      int mid = ((l + r) >> 1);
      if (v[i] >= t[mid] - t[i - 1]) {
        l = mid;
      } else {
        r = mid;
      }
    }
    int index = 0;
    if (v[i] >= t[l] - t[i - 1]) {
      index = l;
    }
    if (v[i] >= t[r] - t[i - 1]) {
      index = r;
    }
    if (index != 0) {
      d[index]++;
      d[i - 1]--;
      add[index + 1] += v[i] - t[index] + t[i - 1];
    } else {
      add[i] += v[i];
    }
  }
  long long kol = 0;
  for (int i = n; i >= 1; --i) {
    kol += d[i];
    ans[i] = kol * (t[i] - t[i - 1]) + add[i];
  }
  for (int i = 1; i <= n; ++i) {
    cout << ans[i] << ' ';
  }
}
