#include <bits/stdc++.h>
using namespace std;
long long int snow[1000000], temp[1000000], temp1[1000000];
long long int tot[1000000], tot1[1000000];
int main() {
  ios_base::sync_with_stdio(0);
  long long int n;
  cin >> n;
  for (long long int i = 1; i <= n; i++) {
    cin >> snow[i];
  }
  for (long long int i = 1; i <= n; i++) {
    cin >> temp[i];
    temp1[i] += temp[i] + temp1[i - 1];
  }
  for (long long int i = 1; i <= n; i++) {
    long long int ans =
        upper_bound(temp1 + i, temp1 + n + 1, snow[i] + temp1[i - 1]) - (temp1);
    tot[i] += 1;
    tot[ans] += -1;
    tot1[ans] += snow[i] - (temp1[ans - 1] - temp1[i - 1]);
  }
  for (long long int i = 1; i <= 100001; i++) {
    tot[i] += tot[i - 1];
  }
  for (long long int i = 1; i <= n; i++) {
    tot[i] = tot[i] * temp[i] + tot1[i];
    cout << tot[i] << " ";
  }
  cout << endl;
  return 0;
}
