#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 100001;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long N;
  cin >> N;
  vector<long long> piles(N), temperature(N);
  vector<long long> rest(N);
  vector<long long> melting(N);
  vector<long long> calosc(N);
  vector<long long> odjac_calosc(N);
  for (int i = 0; i < (N); i++) cin >> piles[i];
  for (int i = 0; i < (N); i++) cin >> temperature[i];
  melting[0] = temperature[0];
  odjac_calosc[0] = 0;
  calosc[0] = 0;
  for (int i = (1); i < (N); i++) {
    odjac_calosc[i] = calosc[i] = rest[i] = 0;
    melting[i] = melting[i - 1] + temperature[i];
  }
  for (int i = 0; i < (N); i++) {
    long long pile = piles[i];
    if (pile == 0) continue;
    long long melting_prev = (i > 0) ? melting[i - 1] : 0;
    auto ptr = lower_bound(melting.begin(), melting.end(), pile + melting_prev);
    auto pos = ptr - melting.begin();
    if (pos >= N) {
      calosc[N - 1]++;
      if (i > 0) {
        odjac_calosc[i - 1]++;
      }
      continue;
    }
    long long melting_supr = (pos > 0) ? melting[pos - 1] : 0;
    long long difference =
        min((pile - (melting_supr - melting_prev)), temperature[pos]);
    if (difference <= 0) {
      calosc[pos]++;
      if (i > 0) {
        odjac_calosc[i - 1]++;
      }
    } else {
      rest[pos] += difference;
      if (pos > 0) {
        calosc[pos - 1]++;
        if (i > 0) odjac_calosc[i - 1]++;
      }
    }
  }
  for (int i = N - 2; i >= 0; i--) {
    calosc[i] = calosc[i] + calosc[i + 1];
    odjac_calosc[i] = odjac_calosc[i] + odjac_calosc[i + 1];
  }
  for (int i = 0; i < (N); i++) {
    long long diff_calosc = (calosc[i] - odjac_calosc[i]) * temperature[i];
    long long result = diff_calosc + rest[i];
    cout << result << " ";
  }
  cout << endl;
  return 0;
}
