#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  scanf("%lld", &n);
  vector<long long int> v, t;
  for (int i = 0; i < n; i++) {
    long long int x;
    scanf("%lld", &x);
    v.push_back(x);
  }
  for (int i = 0; i < n; i++) {
    long long int x;
    scanf("%lld", &x);
    t.push_back(x);
  }
  vector<long long int> tsum;
  tsum.push_back(t[0]);
  for (int i = 1; i < n; i++) {
    tsum.push_back(t[i] + tsum[i - 1]);
  }
  long long int f[n + 2], m[n + 2];
  memset(f, 0, sizeof(f));
  memset(m, 0, sizeof(m));
  vector<long long int>::iterator it;
  int i = 0;
  for (it = tsum.begin(); it != tsum.end(); it++) {
    long long int val = v[i];
    if (v[i] > t[i]) {
      if (i != 0) val += tsum[i - 1];
      vector<long long int>::iterator itr;
      itr = lower_bound(it, tsum.end(), val);
      if (itr == v.end()) {
        f[i] += 1;
        f[n] -= 1;
      } else {
        f[i] += 1;
        int index = (itr - tsum.begin());
        f[index] -= 1;
        if (i != 0)
          m[index] += v[i] - (tsum[index - 1] - tsum[i - 1]);
        else
          m[index] += v[i] - (tsum[index - 1] - tsum[i] + t[i]);
      }
    } else
      m[i] += v[i];
    i++;
  }
  for (int i = 1; i < n; i++) {
    f[i] += f[i - 1];
  }
  for (int i = 0; i < n; i++) {
    printf("%lld ", (f[i] * t[i]) + (m[i]));
  }
  return 0;
}
