#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 50;
long long a[N], pref[N], dp[N], add[N], t[N], n;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= n; i++) {
    cin >> t[i];
    pref[i] = pref[i - 1] + t[i];
  }
  pref[n + 1] = pref[n];
  for (int i = 1; i <= n; i++) {
    int l = i - 1, r = n + 1;
    while (r - l > 1) {
      int mid = (l + r) / 2;
      if (pref[mid] - pref[i - 1] < a[i])
        l = mid;
      else
        r = mid;
    }
    dp[i]++;
    dp[r]--;
    add[r] += a[i] - (pref[r - 1] - pref[i - 1]);
  }
  for (int i = 1; i <= n; i++) {
    dp[i] += dp[i - 1];
    cout << dp[i] * t[i] + add[i] << ' ';
  }
  return 0;
}
