#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n, v[N], t[N];
long long S[N] = {0};
int die[N];
int cnt[N] = {0};
long long bonus[N] = {0};
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> v[i];
  for (int i = 1; i <= n; i++) {
    cin >> t[i];
    S[i] = S[i - 1] + t[i];
  }
  for (int i = 1; i <= n; i++) {
    die[i] = lower_bound(S + 1, S + n + 1, v[i] + S[i - 1]) - S;
    if (die[i] != 0) {
      cnt[i]++;
      cnt[die[i]]--;
    }
    bonus[die[i]] += v[i] - (S[die[i] - 1] - S[i - 1]);
  }
  for (int i = 1; i <= n; i++) cnt[i] += cnt[i - 1];
  for (int i = 1; i <= n; i++) cout << 1LL * cnt[i] * t[i] + bonus[i] << " ";
}
