#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, i = 0, j = 0, k = 0, l = 0, m = 0, a = 0, b = 0, sum = 0, x = 0,
               y = 0, z = 0, c, p = 0;
  cin >> n;
  long long v[n], t[n];
  for (i = 0; i < n; i++) {
    cin >> v[i];
  }
  for (i = 0; i < n; i++) {
    cin >> t[i];
  }
  multiset<long long> s;
  multiset<long long>::iterator itr = s.begin();
  for (i = 0; i < n; i++) {
    s.insert(v[i] + sum);
    sum += t[i];
    x = 0;
    while (!s.empty() && (*s.begin()) <= sum) {
      x += (*s.begin()) - sum + t[i];
      s.erase(s.begin());
    }
    x += s.size() * t[i];
    cout << x << " ";
  }
  return 0;
}
