#include <bits/stdc++.h>
using namespace std;
const double pi = 2 * acos(0);
const int mod = 1000000007;
const int N = 100007;
const int INF = 1e9;
void solve() {
  long long n;
  cin >> n;
  map<long long, long long> mp;
  vector<long long> a(n + 2), b(n + 2), pre(n + 1);
  vector<long long> c(n + 3, 0);
  for (int i = 1; i <= n; i++) cin >> a[i];
  b[0] = pre[0] = 0LL;
  for (int i = 1; i <= n; i++) {
    cin >> b[i];
    pre[i] += pre[i - 1] + b[i];
  }
  for (int i = 1; i <= n; i++) {
    int lo = lower_bound(pre.begin() + i, pre.end(), a[i] + pre[i - 1]) -
             pre.begin();
    c[i]++;
    c[lo]--;
    long long x = (a[i] + pre[i - 1]) - pre[lo - 1];
    mp[lo] += x;
  }
  for (int i = 1; i <= n; i++) c[i] += c[i - 1];
  for (int i = 1; i <= n; i++) cout << c[i] * b[i] + mp[i] << " ";
  cout << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int q = 1;
  while (q--) {
    solve();
  }
  return 0;
}
