#include <bits/stdc++.h>
using namespace std;
long long v[100100], t[100100], sum[100100], f[100100], p[100100];
int n;
int fx(long long x, long long y) {
  int l = 0, r = n + 1;
  while (l + 1 < r) {
    int mid = (l + r) >> 1;
    if (sum[mid] - y > x)
      r = mid;
    else
      l = mid;
  }
  return l;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%I64d", &v[i]);
  for (int i = 1; i <= n; i++) {
    scanf("%I64d", &t[i]);
    sum[i] += sum[i - 1] + t[i];
  }
  for (int i = 1; i <= n; i++) {
    int now = fx(v[i], sum[i - 1]);
    f[now]++;
    f[i - 1]--;
    p[now + 1] += v[i] - (sum[now] - sum[i - 1]);
  }
  for (int i = n; i >= 1; i--) f[i] += f[i + 1];
  for (int i = 1; i <= n; i++) printf("%I64d ", f[i] * t[i] + p[i]);
  printf("\n");
  return 0;
}
