#include <bits/stdc++.h>
using namespace std;
long long ser(long long in, std::vector<long long> v, long long size,
              long long it) {
  for (long long i = in; i < size; i++) {
    if (v[i] > it) return i - 1;
  }
  return size - 1;
}
int main() {
  long long n;
  cin >> n;
  long long a[n];
  long long b[n];
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (long long i = 0; i < n; i++) {
    cin >> b[i];
  }
  std::vector<long long> fre(n + 1, 0);
  for (long long i = 1; i <= n; i++) {
    fre[i] = fre[i - 1] + b[i - 1];
  }
  vector<long long> mul(n + 2, 0);
  vector<long long> addd(n + 2, 0);
  for (long long i = 1; i <= n; i++) {
    long long temp =
        lower_bound(fre.begin(), fre.end(), a[i - 1] + fre[i - 1]) -
        fre.begin();
    temp--;
    mul[i] += 1;
    mul[temp + 1] -= 1;
    addd[temp + 1] += (max(0ll, a[i - 1] + fre[i - 1] - fre[temp]));
  }
  for (long long i = 0; i <= n; i++) {
    mul[i + 1] += mul[i];
  }
  for (long long i = 1; i <= n; i++) cout << mul[i] * b[i - 1] + addd[i] << " ";
}
