#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
const double eps = 1e-9;
const int inf = 0x3f3f3f3f;
const int mod = 1e9 + 7;
const int maxn = 6e6 + 10;
const int MAX = 1e5;
const double pi = acos(-1.0);
const long long INF = 0x3f3f3f3f3f3f3f;
long long qpow(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) res = (res * a) % mod;
    a = (a * a) % mod;
    b >>= 1;
  }
  return res % mod;
}
long long v[maxn], t[maxn], sum[maxn];
struct T1 {
  int pos;
  long long num;
  bool operator<(const T1 &A) const { return num > A.num; }
};
priority_queue<T1> q;
int main() {
  long long n = read();
  for (int i = 1; i < n + 1; i++) v[i] = read();
  for (int i = 1; i < n + 1; i++) {
    t[i] = read();
    sum[i] = sum[i - 1] + t[i];
  }
  T1 curT1, nowT1;
  for (int i = 1; i < n + 1; i++) {
    curT1.num = sum[i - 1] + v[i];
    curT1.pos = i;
    q.push(curT1);
    long long tortal = t[i] * q.size(), left, delleft;
    do {
      nowT1 = q.top();
      delleft = sum[i];
      left = nowT1.num - delleft;
      if (left <= 0) {
        tortal -= (delleft - nowT1.num);
        q.pop();
      }
      if (q.empty()) break;
    } while (left <= 0);
    cout << tortal << ' ';
  }
  return 0;
}
