#include <bits/stdc++.h>
int32_t BinarySearch(std::vector<int64_t>& sums, int64_t val) {
  int32_t start = 0;
  int32_t end = sums.size() - 1;
  int32_t indx = -1;
  while (start <= end) {
    auto mid = (start + end) / 2;
    if (sums[mid] >= val) {
      indx = mid;
      end = mid - 1;
    } else {
      start = mid + 1;
    }
  }
  return indx;
}
int main() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(nullptr);
  std::cout.tie(nullptr);
  int32_t n;
  std::cin >> n;
  std::vector<int64_t> snows(n);
  std::vector<int64_t> temps(n);
  for (auto i = 0; i < n; i++) {
    std::cin >> snows[i];
  }
  for (auto i = 0; i < n; i++) {
    std::cin >> temps[i];
  }
  std::map<int32_t, std::vector<int32_t>> map;
  std::vector<int64_t> sums(n);
  std::vector<int64_t> snowSums(n);
  for (auto i = 0; i < n; i++) {
    sums[i] += temps[i];
    if (i > 0) sums[i] += sums[i - 1];
  }
  int64_t sum = 0;
  for (auto i = 0; i < n; i++) {
    auto indx = BinarySearch(sums, snows[i] + sum);
    if (indx != -1) {
      map[indx].push_back(i);
    }
    sum += temps[i];
  }
  sum = 0;
  int32_t counts = 0;
  for (auto i = 0; i < n; i++) {
    auto minus = sums[i];
    auto it = map.find(i);
    int64_t lost = temps[i] * (counts + 1);
    if (it != map.end()) {
      for (const auto& val : it->second) {
        auto valSum = snows[val];
        auto tempD = 0;
        if (i > 0) {
          tempD += sums[i - 1];
        }
        if (val > 0) {
          tempD -= sums[val - 1];
        }
        auto diff = valSum - tempD;
        lost += diff;
        lost -= temps[i];
        counts--;
      }
    }
    counts++;
    std::cout << lost << " ";
  }
  return 0;
}
