#include <bits/stdc++.h>
using namespace std;
struct node {
  double x, y;
};
long long n, m, k;
void solve() {
  long long i, j, x, y, z;
  cin >> n;
  vector<long long> a(n + 1, 0), an(n + 1, 0), ext(n + 1, 0), t(n + 1, 0);
  for (i = 1; i < n + 1; i++) cin >> a[i];
  for (i = 1; i < n + 1; i++) {
    cin >> t[i];
    t[i] += t[i - 1];
  }
  for (i = 1; i < n + 1; i++) {
    long long l, h, ans, mid;
    l = i;
    h = n;
    ans = -1;
    while (l <= h) {
      mid = l + (h - l) / 2;
      if (t[mid] - t[i - 1] >= a[i]) {
        ans = mid;
        h = mid - 1;
      } else
        l = mid + 1;
    }
    if (ans == -1)
      an[i]++;
    else {
      if (t[ans] - t[i - 1] == a[i]) {
        an[i]++;
        if (ans != n) an[ans + 1]--;
      } else {
        an[i]++;
        an[ans]--;
        ext[ans] += a[i] - (t[ans - 1] - t[i - 1]);
      }
    }
  }
  for (i = 1; i < n + 1; i++) an[i] += an[i - 1];
  for (i = 1; i < n + 1; i++) an[i] *= (t[i] - t[i - 1]);
  for (i = 1; i < n + 1; i++) an[i] += ext[i];
  for (i = 1; i < n + 1; i++) cout << an[i] << " ";
  cout << '\n';
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  while (t--) {
    solve();
  }
}
