#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
long long sear(long long l, long long r, long long x, vector<long long> &pr) {
  while (l <= r) {
    long long m = (l + r) / 2;
    if (pr[m] <= x)
      l = m + 1;
    else
      r = m - 1;
  }
  return l;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cout << fixed;
  cout.precision(12);
  long long n;
  cin >> n;
  vector<long long> a(n), b(n), pr(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  for (long long i = 0; i < n; i++) cin >> b[i];
  pr[0] = b[0];
  for (long long i = 1; i < n; i++) pr[i] = (pr[i - 1] + b[i]);
  vector<long long> ar(n + 1), br(n + 1);
  long long pre = 0;
  for (long long i = 0; i < n; i++) {
    long long x = sear(i, n - 1, a[i] + pre, pr);
    ar[i] += 1;
    ar[x] -= 1;
    if (x >= 1)
      br[x] += (a[i] + pre - pr[x - 1]);
    else if (x == 0)
      br[x] = a[i];
    pre = pr[i];
  }
  for (long long i = 1; i < n; i++) {
    ar[i] += ar[i - 1];
  }
  for (long long i = 0; i < n; i++) {
    long long an = ar[i] * b[i] + br[i];
    cout << an << " ";
  }
  return 0;
}
