#include <bits/stdc++.h>
using namespace std;
int n;
const int N = 200105;
vector<long long int> F(N, 0), T(N), sT, M(N, 0), V(N);
void _input() {
  cin >> n;
  for (int i = int(0); i < int(n); ++i) cin >> V[i];
  for (int i = int(0); i < int(n); ++i) cin >> T[i];
  sT = vector<long long int>(n + 1, 0);
}
void _solve() {
  for (int i = int(0); i < int(n); ++i) sT[i + 1] = sT[i] + T[i];
  for (int i = int(0); i < int(n); ++i) {
    if (V[i] == 0) continue;
    long long int r =
        lower_bound(sT.begin(), sT.end(), V[i] + sT[i]) - sT.begin();
    F[i]++;
    r--;
    F[r]--;
    long long int tot = sT[r] - sT[i];
    if (V[i] - tot > 0) M[r] += V[i] - tot;
  }
  for (int i = int(0); i < int(n - 1); ++i) F[i + 1] += F[i];
  for (int i = int(0); i < int(n); ++i) {
    cout << F[i] * T[i] + M[i] << ' ';
  }
  cout << endl;
}
int main() {
  int qq = 1;
  while (qq--) {
    _input();
    _solve();
  }
}
