#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
long long sum[MAXN];
long long a[MAXN];
long long b[MAXN];
long long sm[MAXN];
long long ans[MAXN];
long long n;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) cin >> b[i], sum[i] = sum[i - 1] + b[i];
  for (int i = 1; i <= n; i++) {
    long long l = i, r = n, mid;
    long long p = i - 1;
    while (l <= r) {
      mid = (l + r) / 2;
      if (sum[mid] - sum[i - 1] > a[i])
        r = mid - 1;
      else
        p = mid, l = mid + 1;
    }
    if (p == i - 1)
      ans[i] += a[i];
    else {
      sm[i]++, sm[p + 1]--;
      ans[p + 1] += a[i] - (sum[p] - sum[i - 1]);
    }
  }
  for (int i = 1; i <= n; i++) sm[i] += sm[i - 1];
  for (int i = 1; i <= n; i++) {
    ans[i] += sm[i] * b[i];
    cout << ans[i] << " ";
  }
  cout << endl;
  return 0;
}
