#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int mod = 1e9 + 7;
const int maxn = 1e5 + 10;
int a[maxn], t[maxn];
priority_queue<long long, vector<long long>, greater<long long> > qu;
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  for (int i = 1; i <= n; ++i) scanf("%d", &t[i]);
  long long del = 0;
  for (int i = 1; i <= n; ++i) {
    qu.push(a[i] + del);
    long long aa = 0;
    while (!qu.empty()) {
      long long g = qu.top();
      if (g <= del + t[i]) {
        aa += g - del;
        qu.pop();
      } else
        break;
    }
    int sz = qu.size();
    del += t[i];
    cout << aa + (long long)sz * t[i] << "\n";
  }
  return 0;
}
