#include <bits/stdc++.h>
using namespace std;
long long t, d, ct, q, ans, l, m, r, n, mx, mn, i, j, k, x, y, z, s;
char ch;
string ss = "", str = "";
map<long long, long long> mp;
multiset<long long> st;
long long a[200003], b[200003];
int main() {
  ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
  s = k = d = l = mx = m = mn = r = q = i = j = z = x = y = ct = ans = 0;
  cin >> n;
  for (i = 0; i < n; i++) cin >> a[i];
  long long prev = 0;
  for (i = 0; i < n; i++) {
    cin >> t;
    st.insert(a[i] + prev);
    ans = 0;
    auto it = st.lower_bound(prev + t);
    for (auto itt = st.begin(); itt != it;) {
      ans += *itt - prev;
      auto ittt = itt;
      itt++;
      st.erase(ittt);
    }
    ans += st.size() * t;
    prev += t;
    cout << ans << " ";
  }
  return 0;
}
