#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx")
using namespace std;
bool is_prime(int n) {
  for (int i = 2; i * i <= n; ++i) {
    if (n % i == 0) {
      return false;
    }
  }
  return true;
}
inline long long getPow(long long a, long long b) {
  long long res = 1, tp = a;
  while (b) {
    if (b & 1ll) {
      res *= tp;
      res %= 1000000007;
    }
    tp *= tp;
    tp %= 1000000007;
    b >>= 1ll;
  }
  return res;
}
inline long long to_ll(string s) {
  long long cur = 0;
  for (int i = 0; i < s.size(); i++) {
    cur = cur * 10 + s[i] - '0';
  }
  return cur;
}
inline string to_str(long long x) {
  string s = "";
  while (x) {
    s += char(x % 10 + '0');
    x /= 10;
  }
  reverse(s.begin(), s.end());
  return s;
}
inline long long nxt() {
  long long x;
  scanf("%lld", &x);
  return x;
}
void ok() {
  puts("YES");
  exit(0);
}
void panic() {
  puts("NO");
  exit(0);
}
int main() {
  long long n = nxt();
  vector<long long> v(n);
  for (int i = 0; i < n; i++) {
    v[i] = nxt();
  }
  vector<long long> t(n);
  for (int i = 0; i < n; i++) {
    t[i] = nxt();
  }
  multiset<long long> fix;
  long long buf = 0;
  for (int i = 0; i < n; i++) {
    fix.insert(v[i] + buf);
    buf += t[i];
    long long cur = fix.size() * t[i];
    while (fix.size() > 0) {
      long long d = *fix.begin();
      if (d > buf) {
        break;
      }
      cur -= buf - *fix.begin();
      fix.erase(fix.begin());
    }
    cout << cur << " ";
  }
  return 0;
}
