#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 7;
const int N = 1e5 + 5;
long long v[N], t[N], pv[N], ans[N], pref[N];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> v[i];
  }
  for (int i = 1; i <= n; i++) {
    cin >> t[i];
    t[i] += t[i - 1];
  }
  t[n + 1] = inf * 1ll * N;
  for (int i = 1; i <= n; i++) {
    v[i] += t[i - 1];
    int it = upper_bound(t + 1, t + n + 1, v[i]) - t;
    if (t[it - 1] == v[i]) it--;
    ans[it] += (t[it] - t[it - 1]) - (t[it] - v[i]);
    pref[it] += -1ll;
    pref[i] += 1ll;
  }
  for (int i = 1; i <= n; i++) {
    pref[i] += pref[i - 1];
    ans[i] += pref[i] * 1ll * (t[i] - t[i - 1]);
  }
  for (int i = 1; i <= n; i++) cout << ans[i] << " ";
  cout << endl;
  return 0;
}
