#include <bits/stdc++.h>
using namespace std;
long long int n, v[101010], acc[101010], inteiro[101010], parcial[101010],
    t[101010];
long long int get(long long int l, long long int r) {
  if (l > r) return 0;
  return acc[r] - acc[l - 1];
}
void build(long long int idx) {
  long long int lo = idx, hi = n, mid, ans = idx - 1;
  while (lo <= hi) {
    mid = (lo + hi) / 2;
    if (get(idx, mid) <= v[idx]) {
      ans = max(ans, mid);
      lo = mid + 1;
    } else
      hi = mid - 1;
  }
  parcial[ans + 1] += v[idx] - get(idx, ans);
  inteiro[idx]++;
  inteiro[ans + 1]--;
}
int main() {
  cin >> n;
  for (long long int i = 1; i <= n; i++) cin >> v[i];
  for (long long int i = 1; i <= n; i++) {
    cin >> t[i];
    acc[i] = t[i] + acc[i - 1];
  }
  for (long long int i = 1; i <= n; i++) build(i);
  for (long long int i = 1; i <= n; i++) {
    inteiro[i] += inteiro[i - 1];
    cout << inteiro[i] * t[i] + parcial[i] << " ";
  }
  cout << "\n";
  return 0;
}
