#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x;
  char c;
  int f = 1;
  while ((c = getchar()) != '-' && (c > '9' || c < '0'))
    ;
  if (c == '-') c = getchar(), f = -1;
  x = c ^ '0';
  while ((c = getchar()) >= '0' && c <= '9')
    x = (x << 1) + (x << 3) + (c ^ '0');
  return x * f;
}
inline long long readll() {
  long long x;
  char c;
  int f = 1;
  while ((c = getchar()) != '-' && (c > '9' || c < '0'))
    ;
  if (c == '-') c = getchar(), f = -1;
  x = c ^ '0';
  while ((c = getchar()) >= '0' && c <= '9')
    x = (x << 1ll) + (x << 3ll) + (c ^ '0');
  return x * f;
}
const int maxn = 1e5 + 10;
long long a[maxn];
long long b[maxn], c[maxn];
long long ans[maxn];
int main() {
  int n = read();
  for (register int i = 1, iend = n; i <= iend; ++i) a[i] = read();
  for (register int i = 1, iend = n; i <= iend; ++i) {
    b[i] = read();
    b[i] += b[i - 1];
  }
  for (register int i = 1, iend = n; i <= iend; ++i) {
    long long u = a[i] + b[i - 1];
    int x = lower_bound(b + 1, b + n + 1, u) - b;
    c[i] += 1, c[x] -= 1;
    ans[x] += u - b[x - 1];
  }
  for (register int i = 1, iend = n; i <= iend; ++i) {
    c[i] += c[i - 1];
    ans[i] += c[i] * (b[i] - b[i - 1]);
    printf("%lld%c", ans[i], i == iend ? '\n' : ' ');
  }
  return 0;
}
