#include <bits/stdc++.h>
long long a[100005], b[100005], sum[100005], ans[100005];
int flag[100005];
int main(void) {
  long long bet;
  int i, n, l, r, m, now;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) scanf("%lld", &a[i]);
  for (i = 1; i <= n; i++) {
    scanf("%lld", &b[i]);
    sum[i] = sum[i - 1] + b[i];
  }
  for (i = 1; i <= n; i++) {
    l = i, r = n + 1;
    while (l < r) {
      m = (l + r) / 2;
      if (sum[m] - sum[i - 1] < a[i])
        l = m + 1;
      else
        r = m;
    }
    ans[r] += a[i] - (sum[r - 1] - sum[i - 1]);
    flag[i]++, flag[r]--;
  }
  bet = 0, now = 0;
  for (i = 1; i <= n; i++) {
    now += flag[i];
    printf("%lld ", b[i] * now + ans[i]);
  }
  puts("");
  return 0;
}
