#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long long N = 100000;
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  os << "{";
  for (auto it = v.begin(); it != v.end(); ++it) {
    if (it != v.begin()) os << ", ";
    os << *it;
  }
  return os << "}";
}
template <typename first, typename second>
ostream &operator<<(ostream &os, const pair<first, second> &p) {
  return os << "(" << p.first << ", " << p.second << ")";
}
template <typename T>
ostream &operator<<(ostream &os, const set<T> &v) {
  os << "[";
  for (auto it = v.begin(); it != v.end(); ++it) {
    if (it != v.begin()) os << ", ";
    os << *it;
  }
  return os << "]";
}
template <typename T>
ostream &operator<<(ostream &os, const multiset<T> &v) {
  os << "[";
  for (auto it = v.begin(); it != v.end(); ++it) {
    if (it != v.begin()) os << ", ";
    os << *it;
  }
  return os << "]";
}
template <typename first, typename second>
ostream &operator<<(ostream &os, const map<first, second> &v) {
  os << "[";
  for (auto it = v.begin(); it != v.end(); ++it) {
    if (it != v.begin()) os << ", ";
    os << it->first << " = " << it->second;
  }
  return os << "]";
}
void scan(vector<long long> &a) {
  long long cum = 0;
  for (long long i = 0; i < a.size(); i++) {
    cum += a[i];
    a[i] = cum;
  }
}
void fast(long long n, vector<long long> &a, vector<long long> &b) {
  multiset<long long> ms;
  long long last = 0;
  for (long long i = 0; i < n; i++) {
    ms.insert(a[i] + last);
    last += b[i];
    long long cur = 0;
    while (ms.size() > 0 and *(ms.begin()) < last) {
      cur += ((*ms.begin()) - (last - b[i]));
      ms.erase(ms.begin());
    }
    cur += (b[i] * ms.size());
    cout << cur << ' ';
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<long long> b(n);
  for (long long i = 0; i < n; i++) {
    cin >> b[i];
  }
  fast(n, a, b);
  return 0;
}
