#include <bits/stdc++.h>
using namespace std;
long long a[100005], t[100005], s[100005], b[100005], c[100005];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%I64d", a + i);
  }
  for (int i = 1; i <= n; i++) {
    scanf("%I64d", t + i);
    s[i] = t[i] + s[i - 1];
  }
  for (int i = 1; i <= n; i++) {
    int l = i, r = n;
    long long mdfy = s[i - 1];
    while (l <= r) {
      int mid = (l + r) >> 1;
      if (a[i] >= s[mid] - mdfy) {
        l = mid + 1;
      } else {
        r = mid - 1;
      }
    }
    b[r + 1] += a[i] - s[r] + mdfy;
    c[i]++, c[r + 1]--;
  }
  for (int i = 1; i <= n; i++) {
    c[i] += c[i - 1];
    printf("%I64d ", t[i] * c[i] + b[i]);
  }
  return 0;
}
