#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
istream& operator>>(istream& in, pair<T1, T2>& p) {
  in >> p.first >> p.second;
  return in;
}
template <typename T1, typename T2>
ostream& operator<<(ostream& out, pair<T1, T2> p) {
  out << p.first << " " << p.second;
  return out;
}
template <typename T>
istream& operator>>(istream& in, vector<T>& arr) {
  for (auto& i : arr) {
    in >> i;
  }
  return in;
}
template <typename T>
ostream& operator<<(ostream& out, vector<T> arr) {
  for (int64_t i = 0; i < (int64_t)arr.size() - 1; ++i) out << arr[i] << " ";
  if (arr.size()) out << arr.back();
  out << '\n';
  return out;
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int64_t n;
  cin >> n;
  vector<int64_t> v(n);
  cin >> v;
  vector<int64_t> t(n);
  cin >> t;
  vector<int64_t> preft(n + 1);
  for (int64_t i = 0; i < n; ++i) {
    preft[i + 1] = preft[i] + t[i];
  }
  vector<int64_t> bal(n + 1);
  vector<int64_t> pls(n);
  for (int64_t i = 0; i < n; ++i) {
    if (preft.back() - preft[i] <= v[i]) {
      bal[i] += 1;
      bal[n] -= 1;
      continue;
    }
    if (t[i] > v[i]) {
      pls[i] += v[i];
      continue;
    }
    int64_t l = i, r = n;
    while (r - l > 1) {
      int64_t m = (r + l) / 2;
      if (v[i] > preft[m] - preft[i]) {
        l = m;
      } else {
        r = m;
      }
    }
    bal[i] += 1;
    bal[l] -= 1;
    pls[l] += v[i] - (preft[l] - preft[i]);
  }
  for (int64_t i = 1; i < n; ++i) {
    bal[i] += bal[i - 1];
  }
  for (int64_t i = 0; i < n; ++i) {
    cout << bal[i] * t[i] + pls[i] << " ";
  }
  cout << '\n';
  return 0;
}
