#include <bits/stdc++.h>
int bsf(int x) { return __builtin_ctz(x); }
int bsr(int x) { return 31 - __builtin_clz(x); }
using namespace std;
const double pi = 3.14159265358979323846;
const int inf = (int)2e+9 + 2;
const int mod = (int)1e+9 + 7;
const double eps = 1e-8;
const int N = 100000;
int n, m, k;
int a[N];
int b[N];
long long p[N];
long long ans[N + 1];
long long sum[N];
void solve() {
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  for (int i = 0; i < n; ++i) {
    cin >> b[i];
    p[i] = b[i];
  }
  for (int i = 1; i < n; ++i) {
    p[i] += p[i - 1];
  }
  for (int i = 0; i < n; ++i) {
    long long add = i ? p[i - 1] : 0;
    int pos = lower_bound(p + i, p + n, a[i] + add) - p;
    if (pos < n) sum[pos] += a[i] + add - (pos ? p[pos - 1] : 0);
    ++ans[i];
    --ans[pos];
  }
  for (int i = 1; i < n; ++i) ans[i] += ans[i - 1];
  for (int i = 0; i < n; ++i) cout << ans[i] * b[i] + sum[i] << ' ';
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  int test = 1;
  for (; test; --test) solve();
  return 0;
}
