#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1e5 + 1;
int N;
long long T[MAX_N], V[MAX_N];
multiset<long long> s;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> N;
  for (int i = 1; i <= N; i++) cin >> V[i];
  for (int i = 1; i <= N; i++) cin >> T[i];
  long long base = 0, ans = 0;
  for (int i = 1; i <= N; i++) {
    s.insert(V[i] + base);
    base += T[i];
    long long total = T[i] * s.size();
    while (!s.empty() && *s.begin() - base <= 0) {
      total -= abs(*s.begin() - base);
      s.erase(s.begin());
    }
    cout << total << " ";
  }
  return 0;
}
