#include <bits/stdc++.h>
const int mod = 1000001;
using namespace std;
long long ff(long long v[], long long t[], long long n, long long target,
             int i) {
  long long xc = t[n - 1];
  if (i > 0) xc -= t[i - 1];
  if (xc < v[i]) return -1LL;
  long long low = i, high = n - 1;
  while (low != high) {
    int mid = (low + high) / 2;
    long long midv = t[mid];
    if (i > 0) midv -= t[i - 1];
    if (midv < target) {
      low = mid + 1;
    } else {
      high = mid;
    }
  }
  return high;
}
template <class T>
void print(T a[], T day[], int n) {
  for (int i = 0; i < n; i++) cout << a[i] << " " << day[i] << " , ";
  cout << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int n;
  cin >> n;
  long long v[n], t[n];
  for (int i = 0; i < n; i++) cin >> v[i];
  for (int i = 0; i < n; i++) cin >> t[i];
  for (int i = 1; i < n; i++) t[i] += t[i - 1];
  long long day[n];
  long long p[n];
  for (int i = 0; i < n; i++) p[i] = 0, day[i] = 0;
  for (int i = 0; i < n; i++) {
    long long xn = ff(v, t, n, v[i], i);
    p[i]++;
    if (xn != -1LL) {
      p[xn]--;
      if (xn > i) {
        if (i > 0)
          day[xn] += (v[i] - (t[xn - 1] - t[i - 1]));
        else
          day[xn] += (v[i] - t[xn - 1]);
      } else
        day[xn] += v[i];
    }
  }
  for (int i = 1; i < n; i++) p[i] += p[i - 1];
  day[0] += p[0] * t[0];
  for (int i = 1; i < n; i++) {
    day[i] += p[i] * (t[i] - t[i - 1]);
  }
  for (int i = 0; i < n; i++) cout << day[i] << " ";
  return 0;
}
