#include <bits/stdc++.h>
using namespace std;
const int md = 1e9 + 7;
const int MX = 2e5 + 5;
const long long INF = 1e18;
const long double PI = 4 * atan((long double)1);
long long power(long long a, long long n) {
  long long res = 1;
  while (n) {
    if (n % 2) res *= a;
    a *= a;
    n /= 2;
  }
  return res;
}
long long abst(long long a) { return ((a < 0) ? (-1 * a) : (a)); }
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long n;
  cin >> n;
  long long v[n + 1], t[n + 1];
  vector<long long> pref(n + 1);
  pref[0] = 0;
  for (int i = 1; i <= n; i++) cin >> v[i];
  for (int i = 1; i <= n; i++) {
    cin >> t[i];
    pref[i] = pref[i - 1] + t[i];
  }
  long long neg[n + 1], negov[n + 1];
  for (int i = 0; i <= n; i++) neg[i] = negov[i] = 0;
  vector<long long> resd[n + 1];
  for (int i = 1; i <= n; i++) {
    long long in = lower_bound(pref.begin(), pref.end(), (v[i] + pref[i - 1])) -
                   pref.begin();
    if (in != (n + 1)) {
      if (in == 0) in++;
      resd[in].push_back(v[i] + pref[i - 1] - pref[in - 1]);
      neg[in]++;
    }
  }
  for (int i = 1; i <= n; i++) {
    negov[i] = negov[i - 1] + neg[i];
  }
  for (int i = 1; i <= n; i++) {
    long long tmp = t[i] * i;
    long long sum = 0;
    for (int j = 0; j < resd[i].size(); j++) sum += resd[i][j];
    tmp += sum;
    tmp = tmp - (negov[i] * t[i]);
    cout << tmp << " ";
  }
  return 0;
}
