#include <bits/stdc++.h>
using namespace std;
int IT_MAX = 1 << 19;
int MOD = 1000000007;
const int INF = 0x3f3f3f3f;
const long long LL_INF = 0x3f3f3f3f3f3f3f3f;
const double PI = acos(-1);
const double ERR = 1e-10;
bool cmp(int a, int b) { return a > b; }
const int MAX = 100001;
long long a[MAX], b[MAX];
long long ans[MAX];
int main() {
  priority_queue<long long, vector<long long>, greater<long long> > q;
  int n;
  memset(ans, 0, sizeof(ans));
  scanf("%d", &n);
  ;
  for (int(i) = 0; (i) < n; (i)++) scanf("%lld", &a[i]);
  ;
  for (int(i) = 0; (i) < n; (i)++) scanf("%lld", &b[i]);
  ;
  long long sum = 0;
  long long sum1;
  for (int i = 0; i < n; i++) {
    q.push(a[i] + sum);
    sum += b[i];
    while (q.top() < sum && q.size() != 0) {
      long long temp = q.top();
      if (i - 1 == -1)
        ans[i] += temp;
      else
        ans[i] += temp - sum1;
      q.pop();
    }
    ans[i] += b[i] * q.size();
    sum1 = sum;
  }
  for (int i = 0; i < n; i++) printf("%lld ", ans[i]);
}
