#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 10;
long long n, sp = 0;
multiset<long long> m;
long long v[MAXN], t[MAXN];
long long offset = 0;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> v[i];
  for (int i = 0; i < n; i++) cin >> t[i];
  for (int i = 0; i < n; i++) {
    m.insert(v[i] + offset);
    sp++;
    long long ans = 0;
    for (multiset<long long>::iterator iter = m.begin(); iter != m.end();) {
      long long x = *iter;
      if (x - offset <= t[i]) {
        ans += x - offset;
        sp--;
        iter++;
        m.erase(x);
      } else {
        break;
      }
    }
    offset += t[i];
    cout << ans + sp * t[i] << ' ';
  }
  return 0;
}
