#include <bits/stdc++.h>
using namespace std;
int n;
long long a[100003];
long long t[100003];
int result;
long long answer[100003];
int check[100003];
long long b_s(long long l, long long r, long long val) {
  long long mid;
  while (l < r) {
    mid = (l + r) / 2;
    if (t[mid] >= val)
      r = mid;
    else
      l = mid + 1;
  }
  return l;
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) {
    cin >> t[i];
  }
  for (int i = 1; i < n; i++) t[i] += t[i - 1];
  for (int i = 0; i < n; i++) {
    int ptr = b_s(i, n - 1, a[i]);
    if (t[ptr] < a[i]) {
      check[i]++;
      check[ptr + 1]--;
      answer[ptr + 1] = a[i] - t[ptr];
    }
    if (t[ptr] >= a[i]) {
      check[i]++;
      check[ptr]--;
      if (ptr > 0)
        answer[ptr] += a[i] - t[ptr - 1];
      else
        answer[ptr] += a[i];
    }
    a[i + 1] += t[i];
  }
  for (int i = 1; i < n; i++) {
    check[i] += check[i - 1];
  }
  cout << check[0] * t[0] + answer[0] << " ";
  for (int i = 1; i < n; i++) {
    cout << check[i] * (t[i] - t[i - 1]) + answer[i] << " ";
  }
  return 0;
}
