#include <bits/stdc++.h>
using namespace std;
long long n, v[100010], t[100010], f[100010], p[100010], l, r, mid;
void kp(long long x, long long y) {
  long long i = x, j = y, mid = p[(i + j) / 2];
  while (i < j) {
    while (p[i] < mid) i++;
    while (p[j] > mid) j--;
    if (i <= j) {
      swap(p[i], p[j]);
      i++;
      j--;
    }
  }
  if (i < y) kp(i, y);
  if (j > x) kp(x, j);
}
int main() {
  long long i, j, k;
  scanf("%lld", &n);
  for (i = 1; i <= n; i++) scanf("%lld", &v[i]);
  for (i = 1; i <= n; i++) {
    scanf("%lld", &t[i]);
    f[i] = f[i - 1] + t[i];
    p[i] = f[i - 1] + v[i];
  }
  p[n + 1] = (long long)999999999999999;
  kp(1, n);
  for (k = 0, j = 1, i = 1; i <= n; i++) {
    long long ls = ++k * t[i];
    while (p[j] <= f[i]) k--, ls -= f[i] - p[j++];
    printf("%lld ", ls);
  }
  return 0;
}
