#include <bits/stdc++.h>
using namespace std;
const double g = 10.0, eps = 1e-12;
const int N = 100000 + 10, maxn = 2000 + 10, inf = 0x3f3f3f3f,
          INF = 0x3f3f3f3f3f3f3f3f;
long long sum[N], v[N], t[N];
long long ans[N], le[N];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%lld", &v[i]);
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &t[i]);
    sum[i] = sum[i - 1] + t[i];
  }
  for (int i = 1; i <= n; i++) {
    int l = i - 1, r = n + 1;
    while (l < r - 1) {
      int m = (l + r) >> 1;
      if (sum[m] - sum[i - 1] <= v[i])
        l = m;
      else
        r = m;
    }
    le[l + 1] += v[i] - (sum[l] - sum[i - 1]);
    ans[i]++, ans[l + 1]--;
  }
  for (int i = 1; i <= n; i++) ans[i] += ans[i - 1];
  for (int i = 1; i <= n; i++) printf("%lld ", ans[i] * t[i] + le[i]);
  return 0;
}
