#include <bits/stdc++.h>
using namespace std;
long long v[1000005], t[1000005];
struct node {
  int pos, left, right;
  int val, idx;
  node() {}
  node(int _left) { left = _left; }
  bool operator<(node X) const { return v[left] >= v[X.left]; }
};
double eps = 1e-9;
long long sum[1000005];
long long ans[1000005];
long long res[1000005];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> v[i];
  for (int i = 1; i <= n; i++) cin >> t[i];
  for (int i = 1; i <= n; i++) {
    sum[i] += sum[i - 1] + t[i];
  }
  for (int i = 1; i <= n; i++) {
    int j = upper_bound(sum + i, sum + 1 + n, v[i] + sum[i - 1]) - (sum);
    if (j > n) {
      ans[i]++;
    } else
      ans[i]++, ans[j]--, res[j] += v[i] - (sum[j - 1] - sum[i - 1]);
  }
  for (int i = 1; i <= n; i++) {
    ans[i] += ans[i - 1];
    long long x = ans[i] * 1ll * t[i] + res[i];
    cout << x << " ";
  }
  return 0;
}
