#include <bits/stdc++.h>
using namespace std;
int N;
long long V[100005], T[100005], P[100005], W[100005];
vector<long long> R[100005];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> N;
  for (int i = 1; i <= N; i++) {
    cin >> V[i];
  }
  for (int i = 1; i <= N; i++) {
    cin >> T[i];
    P[i] = P[i - 1] + T[i];
  }
  for (int i = 1; i <= N; i++) {
    int lo = i - 1, hi = N + 1;
    while (lo + 1 < hi) {
      int md = (lo + hi) / 2;
      if (P[md] - P[i - 1] <= V[i])
        lo = md;
      else
        hi = md;
    }
    W[i]++;
    W[hi]--;
    R[hi].push_back(V[i] - (P[lo] - P[i - 1]));
  }
  long long Wn = 0;
  for (int i = 1; i <= N; i++) {
    Wn += W[i];
    long long Tot = 0;
    for (long long Ri : R[i]) Tot += Ri;
    Tot += Wn * T[i];
    cout << Tot << ' ';
  }
  return 0;
}
