#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 10, inf = 0x3f3f3f3f;
long long n, a[N], tot, ans;
priority_queue<long long, vector<long long>, greater<long long> > q;
int main() {
  scanf("%lld", &n);
  for (long long i = 0; i < n; ++i) scanf("%lld", &a[i]);
  for (long long i = 0; i < n; ++i) {
    q.push(a[i] + tot), ans = 0;
    long long x;
    scanf("%lld", &x);
    for (; q.size() && q.top() <= x + tot; q.pop()) ans += q.top() - tot;
    tot += x;
    ans += x * q.size();
    printf("%lld%c", ans, " \n"[i == n - 1]);
  }
  return 0;
}
