#include <bits/stdc++.h>
using namespace std;
void dynamic() {
  int n;
  cin >> n;
  long long int v[n + 1];
  long long int t[n + 1];
  vector<long long int> sum;
  sum.push_back(-1);
  v[0] = 0;
  t[0] = 0;
  for (int i = 1; i <= n; i++) {
    cin >> v[i];
  }
  long long int z = 0;
  for (int i = 1; i <= n; i++) {
    cin >> t[i];
    z += t[i];
    sum.push_back(z);
  }
  int hash[n + 1];
  memset(hash, 0, sizeof(hash));
  long long int temp_ans[n + 1];
  memset(temp_ans, 0, sizeof(temp_ans));
  for (int i = 1; i <= n; i++) {
    long long int weight = v[i] + sum[i - 1];
    if (i == 1) weight = v[i];
    if (weight > sum[n]) {
      hash[i]++;
    } else {
      int it = lower_bound(sum.begin(), sum.end(), weight) - sum.begin();
      if (weight == sum[it]) {
        hash[i]++;
        if (it != n) hash[it + 1]--;
      } else {
        hash[i]++;
        hash[it]--;
        if (i == it)
          temp_ans[i] += v[i];
        else {
          long long int temp = sum[it - 1] - sum[i - 1];
          if (i == 1) temp--;
          temp = v[i] - temp;
          temp_ans[it] += temp;
        }
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    hash[i] += hash[i - 1];
  }
  for (int i = 1; i <= n; i++) {
    long long int temp = hash[i] * t[i];
    temp += temp_ans[i];
    cout << temp << " ";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  t = 1;
  while (t--) {
    dynamic();
  }
}
