#include <bits/stdc++.h>
using namespace std;
long long a[100005];
long long t[100005];
long long cum[100005];
long long sve[100005];
long long pojedinacno[100005];
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) cin >> t[i];
  cum[0] = t[0];
  for (int i = 1; i < n; i++) cum[i] = cum[i - 1] + t[i];
  for (int i = 0; i < n; i++) {
    long long skidaj = 0LL;
    if (i > 0) skidaj = cum[i - 1];
    int lo = i, hi = n - 1, mid = lo + hi >> 1, r = -1;
    while (lo <= hi) {
      long long vrednost = cum[mid] - skidaj;
      if (vrednost <= a[i])
        r = mid, lo = mid + 1;
      else
        hi = mid - 1;
      mid = lo + hi >> 1;
    }
    if (r == -1) {
      pojedinacno[i] += a[i];
    } else {
      pojedinacno[r + 1] += a[i] - (cum[r] - skidaj);
      sve[i]++;
      sve[r + 1]--;
    }
  }
  for (int i = 0; i < n; i++) {
    if (i > 0) sve[i] += sve[i - 1];
    cout << sve[i] * t[i] + pojedinacno[i] << " ";
  }
  return 0;
}
