#include <bits/stdc++.h>
using namespace std;
long long V[1000005], T[1000005];
long long sum[1000005], off[1000005], mul[1000005];
signed main() {
  long long n;
  ios_base::sync_with_stdio(false);
  cin >> n;
  for (long long i = 1; i <= n; i++) {
    cin >> V[i];
  }
  for (long long i = 1; i <= n; i++) {
    cin >> T[i];
    sum[i] = sum[i - 1] + T[i];
    mul[i] = 0;
  }
  for (long long i = 1; i <= n; i++) {
    long long low = 1;
    long long high = n;
    if (sum[n] - sum[i - 1] <= V[i])
      mul[i]++;
    else {
      long long ans = -1;
      while (high - low >= 0) {
        long long mid = (low + high) / 2;
        if (sum[mid] - sum[i - 1] >= V[i]) {
          high = mid - 1;
          ans = mid;
        } else
          low = mid + 1;
      }
      mul[i]++;
      mul[ans]--;
      off[ans] += (V[i] - (sum[ans - 1] - sum[i - 1]));
    }
  }
  long long val = 0;
  for (long long i = 1; i <= n; i++) {
    val = val + mul[i];
    cout << val * T[i] + off[i] << " ";
  }
  cout << endl;
  return 0;
}
