#include <bits/stdc++.h>
#pragma GCC optimize("-O3")
using namespace std;
const long long mod = 998244353;
const int N = 1e5 + 10;
int n;
int v[N];
long long mel[N];
long long ans[N];
long long ext[N];
void solve() {
  cin >> n;
  for (int i = (int)0; i != (int)n; i = i + 1) cin >> v[i];
  ;
  for (int i = 1; i <= n; i++) {
    cin >> mel[i];
  }
  for (int i = 1; i <= n; i++) {
    mel[i] += mel[i - 1];
  }
  long long z;
  int j;
  for (int i = 0; i < n; i++) {
    z = mel[i] + v[i];
    j = (lower_bound(mel + i + 1, mel + n + 1, z) - mel);
    ans[i] += 1;
    ans[j - 1] -= 1;
    ext[j - 1] += z - mel[j - 1];
  }
  for (int i = 1; i < n; i++) {
    ans[i] += ans[i - 1];
  }
  for (int i = 0; i < n; i++) {
    ans[i] *= 1ll * (mel[i + 1] - mel[i]);
    ans[i] += ext[i];
  }
  for (int i = (int)0; i != (int)n; i = i + 1) {
    cout << ans[i] << " ";
  }
  cout << '\n';
  ;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
}
