#include <bits/stdc++.h>
using namespace std;
long long int n, V[100002], T[100002];
long long int Tsum[100002];
long long int diff[100002], counts[100002];
long long int ceilSearch(long long int arr[], int low, int high,
                         long long int x) {
  int mid;
  if (x <= arr[low]) return low;
  if (x > arr[high]) return -1;
  mid = (low + high) / 2;
  if (arr[mid] == x)
    return mid;
  else if (arr[mid] < x) {
    if (mid + 1 <= high && x <= arr[mid + 1])
      return mid + 1;
    else
      return ceilSearch(arr, mid + 1, high, x);
  } else {
    if (mid - 1 >= low && x > arr[mid - 1])
      return mid;
    else
      return ceilSearch(arr, low, mid - 1, x);
  }
}
int main() {
  cin >> n;
  int i;
  for (i = 0; i < n; i++) {
    cin >> V[i];
  }
  for (i = 0; i < n; i++) {
    cin >> T[i];
  }
  Tsum[0] = T[0];
  for (i = 1; i < n; i++) {
    Tsum[i] = Tsum[i - 1] + T[i];
  }
  int index;
  for (i = 0; i < n; i++) {
    if (i == 0) {
      index = ceilSearch(Tsum, 0, n - 1, V[i]);
    } else {
      index = ceilSearch(Tsum, 0, n - 1, V[i] + Tsum[i - 1]);
    }
    if (index == -1) {
      counts[i] += 1;
    } else if (index == i) {
      diff[index] += V[i];
    } else {
      counts[i] += 1;
      counts[index] -= 1;
      diff[index] +=
          (T[index] - ((Tsum[index]) - (V[i] + (i > 0 ? Tsum[i - 1] : 0))));
    }
  }
  int ctr = 0;
  for (i = 0; i < n; i++) {
    ctr += counts[i];
    cout << ctr * T[i] + diff[i] << " ";
  }
  return 0;
}
