#include <bits/stdc++.h>
using namespace std;
int64_t a[100005], d[100005], f[100005], re[100005];
vector<int64_t> v;
signed main() {
  std::ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int64_t n, i, add;
  cin >> n;
  for (int64_t i = 1; i <= n; i++) cin >> a[i];
  for (int64_t i = 1; i <= n; i++) cin >> d[i];
  vector<int64_t> pre(n + 1);
  pre[1] = d[1];
  for (int64_t i = 2; i <= n; i++) pre[i] = pre[i - 1] + d[i];
  pre[0] = 0;
  for (int64_t i = 1; i <= n; i++) {
    int64_t pos =
        lower_bound(pre.begin(), pre.end(), a[i] + pre[i - 1]) - pre.begin();
    if (pos < i) continue;
    f[i]++;
    f[pos]--;
    re[pos] += a[i] + pre[i - 1] - pre[pos - 1];
  }
  for (int64_t i = 2; i <= n; i++) f[i] += f[i - 1];
  for (int64_t i = 1; i <= n; i++) cout << f[i] * d[i] + re[i] << ' ';
  return 0;
}
