#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100010;
int n, tr[MAXN];
long long v[MAXN], t[MAXN], sum[MAXN], le[MAXN];
void add(int x, int y) {
  for (; x <= n; x += x & -x) tr[x] += y;
}
int ask(int x) {
  int ans = 0;
  for (; x; x -= x & -x) ans += tr[x];
  return ans;
}
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 pos = upper_bound(sum + i, sum + n + 1, v[i] + sum[i - 1]) - sum;
    add(i, 1), add(pos, -1);
    le[pos] += v[i] - sum[pos - 1] + sum[i - 1];
  }
  for (int i = 1; i <= n; i++) printf("%I64d ", le[i] + ask(i) * t[i]);
  printf("\n");
}
