#include <bits/stdc++.h>
using namespace std;
long long v[100005];
long long t[100005];
long long indi[100005];
vector<long long> cum_t;
vector<long long> cum_v;
long long sum[400005];
int size;
void range_sum(int left, int right) {
  if (left > right) return;
  left = size / 2 + left - 1;
  right = size / 2 - 1 + right;
  sum[left] += 1;
  if (right > left) {
    sum[right] += 1;
    while ((left - 1) / 2 != (right - 1) / 2) {
      if (left % 2) {
        sum[left + 1] += 1;
      }
      left = (left - 1) / 2;
      if (right % 2 == 0) {
        sum[right - 1] += 1;
      }
      right = (right - 1) / 2;
    }
  }
}
int report_sum(int index) {
  int ans = 0;
  index = index + size / 2 - 1;
  while (index != 0) {
    ans += sum[index];
    index = (index - 1) / 2;
  }
  ans += sum[index];
  return ans;
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%lld", &v[i]);
  for (int i = 0; i < n; i++) scanf("%lld", &t[i]);
  for (int i = 0; i < n; i++) {
    if (i == 0) {
      cum_t.push_back(t[0]);
      cum_v.push_back(v[0]);
    } else {
      cum_t.push_back(cum_t[i - 1] + t[i]);
      cum_v.push_back(cum_t[i - 1] + v[i]);
    }
  }
  int i = 0;
  while ((1 << i) < n) i++;
  size = 1 << (i + 1);
  for (int i = 0; i < size; i++) sum[i] = 0;
  for (int i = 0; i < n; i++) indi[i] = 0;
  for (int i = 0; i < n; i++) {
    vector<long long>::iterator it =
        lower_bound(cum_t.begin(), cum_t.end(), cum_v[i]);
    int index = it - cum_t.begin();
    if (index - 1 >= 0) range_sum(i, index - 1);
    if (index < n && index >= i)
      if (index > 0)
        indi[index] += (cum_v[i] - cum_t[index - 1]);
      else
        indi[index] += cum_v[i];
  }
  for (int i = 0; i < n; i++)
    printf("%lld ", report_sum(i) * (long long)t[i] + indi[i]);
  printf("\n");
  return 0;
}
