#include <bits/stdc++.h>
long long int MOD = 1000000007;
using namespace std;
template <class T>
inline void sary(T* st, T* nd) {
  while (st < nd) cin >> *st++;
}
template <class T>
inline double sarys(T* st, T* nd, T sum) {
  while (st < nd) {
    cin >> *st++;
    sum += *st;
  }
  return sum;
}
template <class T>
inline void saryp(T* st, T* nd) {
  while (st < nd) {
    cout << *st++ << " ";
  }
  cout << endl;
}
const int N = 1e6 + 5;
int main() {
  int n;
  cin >> n;
  long long int update[n + 10];
  long long int adhoora[n + 10];
  for (int i = 1; i <= n; i++) {
    update[i] = 0;
  }
  for (int i = 1; i <= n; i++) {
    adhoora[i] = 0;
  }
  long long int arr[n + 1];
  for (int i = 1; i <= n; i++) {
    cin >> arr[i];
  }
  long long int days[n + 1];
  for (int i = 1; i <= n; i++) {
    cin >> days[i];
  }
  long long int prefix[n + 1];
  prefix[0] = 0;
  for (int i = 1; i <= n; i++) {
    prefix[i] = prefix[i - 1] + days[i];
  }
  for (int i = 1; i <= n; i++) {
    long long int minus = prefix[i - 1];
    int low = i;
    int high = n;
    int ans = -1;
    while (low <= high) {
      int mid = low + (high - low) / 2;
      if (prefix[mid] - minus <= arr[i]) {
        ans = mid;
        low = mid + 1;
      } else {
        high = mid - 1;
      }
    }
    if (ans == -1) {
      adhoora[i] += arr[i];
    } else {
      update[i] += 1 * 1ll;
      update[ans + 1] += -1 * 1ll;
      if (arr[i] > prefix[ans] - minus) {
        long long int value_ad = arr[i] - (prefix[ans] - minus);
        adhoora[ans + 1] += value_ad;
      }
    }
  }
  update[0] = 0 * 1ll;
  for (int i = 1; i <= n; i++) {
    update[i] = update[i - 1] + update[i];
  }
  for (int i = 1; i <= n; i++) {
    cout << update[i] * 1ll * days[i] * 1ll + adhoora[i] * 1ll << " ";
  }
  cout << "\n";
  return 0;
}
