#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  long long int vol[n], temp[n];
  for (int i = 0; i < n; i++) scanf("%I64d", &vol[i]);
  for (int i = 0; i < n; i++) scanf("%I64d", &temp[i]);
  int ans[n];
  long long int p[n];
  for (int i = 0; i < n; i++) {
    ans[i] = p[i] = 0;
  }
  vector<long long int> sum;
  long long int t = 0;
  for (int i = 0; i < n; i++) {
    t += temp[i];
    sum.push_back(t);
  }
  t = 0;
  for (int i = 0; i < n; i++) {
    vector<long long int>::iterator it =
        lower_bound(sum.begin() + i, sum.end(), vol[i] + t);
    if (it == sum.end()) {
      ans[i]++;
    } else {
      int index = it - sum.begin();
      long long int x = sum[index] - t;
      if (x == vol[i]) {
        ans[i]++;
        if (index != n - 1) ans[index + 1]--;
      } else {
        ans[i]++;
        ans[index]--;
        long long int y = x - temp[index];
        y = vol[i] - y;
        p[index] += y;
      }
    }
    t += temp[i];
  }
  long long int z = 0;
  for (int i = 0; i < n; i++) {
    z += ans[i];
    printf("%I64d ", z * temp[i] + p[i]);
  }
  return 0;
}
