#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int inf = 2e9 + 100;
const double eps = 1e-9;
const int N = 100100;
int solve() {
  int n;
  long long a[N], b[N];
  cin >> n;
  multiset<long long> s;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) cin >> b[i];
  long long t = 0;
  for (int i = 0; i < n; i++) {
    long long res = 0;
    if (a[i]) s.insert(a[i] + t);
    while (s.size() && *s.begin() - b[i] - t <= 0) {
      res += *s.begin() - t;
      s.erase(s.begin());
    }
    res += b[i] * s.size();
    t += b[i];
    printf("%lld%c", res, (i == n - 1) ? '\n' : ' ');
  }
  return 0;
}
int main() {
  solve();
  return 0;
}
