#include <bits/stdc++.h>
using namespace std;
long long po(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) {
      res = (res * a) % 1000000007;
    }
    a = (a * a) % 1000000007;
    b = b / 2;
  }
  return res % 1000000007;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  {
    long long n;
    long long v[101010];
    multiset<long long> S;
    cin >> n;
    for (long long i = 0; i < n; i++) cin >> v[i];
    long long sum = 0;
    for (long long i = 0; i < n; i++) {
      long long t, ans = 0;
      cin >> t;
      S.insert(v[i] + sum);
      while (!S.empty() && *S.begin() <= sum + t) {
        ans += *S.begin() - sum;
        S.erase(S.begin());
      }
      ans += t * (S.size());
      sum += t;
      cout << ans << " ";
    }
  }
}
