#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 10;
int V[maxn], T[maxn];
long long sum[maxn], tmp[maxn], vis[maxn];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", V + i);
  for (int i = 1; i <= n; i++) scanf("%d", T + i), sum[i] = sum[i - 1] + T[i];
  int cnt = 1;
  for (int i = 1; i <= n; i++) {
    int k = upper_bound(sum + 1, sum + n + 1, V[i] + sum[i - 1]) - sum;
    tmp[k] += sum[k] - V[i] - sum[i - 1];
    vis[k]++;
    printf("%I64d ", (long long)cnt * T[i] - tmp[i]);
    cnt -= vis[i] - 1;
  }
  return 0;
}
