#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
int main() {
  int n;
  scanf("%d", &n);
  vector<long long> a(n);
  for (int i = 0; i < n; i++) {
    scanf("%lld", &a[i]);
  }
  vector<long long> t(n);
  for (int i = 0; i < n; i++) {
    scanf("%lld", &t[i]);
  }
  multiset<long long> S;
  long long sum = 0;
  for (int i = 0; i < n; i++) {
    S.insert(a[i] + sum);
    long long ans = 0;
    sum += t[i];
    while (!S.empty()) {
      long long top = *S.begin();
      if (top < sum) {
        ans += top - (sum - t[i]);
        S.erase(S.begin());
      } else {
        break;
      }
    }
    ans += (long long)(int)((S).size()) * t[i];
    printf("%lld ", ans);
  }
  return 0;
}
