#include <bits/stdc++.h>
using namespace std;
int arr[4][2] = {{-1, 0}, {1, 0}, {0, -1}, {0, 1}};
int main() {
  int n;
  cin >> n;
  long long arr[n], arr1[n];
  for (int i = 0; i < n; i++) cin >> arr[i];
  for (int i = 0; i < n; i++) cin >> arr1[i];
  long long ans[n + 10], ans1[n + 10];
  vector<long long> sum(n);
  memset(ans, 0, sizeof(ans));
  memset(ans1, 0, sizeof(ans1));
  sum[0] = arr1[0];
  for (int i = 1; i < n; i++) sum[i] = sum[i - 1] + arr1[i];
  vector<long long>::iterator it;
  for (int i = 0; i < n; i++) {
    if (i == 0) {
      it = lower_bound(sum.begin(), sum.end(), arr[i]);
      if (it == sum.end()) {
        ans[i]++;
      } else {
        ans[i]++;
        int id = it - sum.begin();
        ans[id + 1]--;
        ans1[id] += arr[i] - sum[id];
      }
    } else {
      it = lower_bound(sum.begin() + i, sum.end(), arr[i] + sum[i - 1]);
      if (it == sum.end())
        ans[i]++;
      else {
        ans[i]++;
        int id = it - sum.begin();
        ans[id + 1]--;
        ans1[id] += (arr[i] + sum[i - 1] - sum[id]);
      }
    }
  }
  long long tem = 0;
  for (int i = 0; i < n; i++) {
    tem += ans[i];
    cout << tem * arr1[i] + ans1[i] << " ";
  }
  return 0;
}
