#include <bits/stdc++.h>
using namespace std;
const long long INF = 922337203685477110;
const long long N = 300005;
const long long mod = 1e9 + 7;
const long long M = 22;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  long long v[n + 3], t[n + 3];
  long long sum = 0;
  for (long long i = 0; i < n; i++) cin >> v[i];
  for (long long j = 0; j < n; j++) cin >> t[j];
  priority_queue<long long, vector<long long>, greater<long long>> pq;
  for (long long i = 0; i < n; i++) {
    long long k = min(v[i], t[i]);
    long long ans = k;
    while (!pq.empty() && (pq.top() - sum) <= t[i]) {
      ans += (pq.top() - sum);
      pq.pop();
    }
    long long s = pq.size();
    ans += (t[i] * s);
    if (!pq.empty()) sum += t[i];
    if (v[i] - k >= 0) pq.push(v[i] - k + sum);
    cout << ans << " ";
  }
  cout << "\n";
}
