#include <bits/stdc++.h>
using namespace std;
long long int tree[400005], lazy[400005];
long long int v[100005], t[100005], st[100005], ans[100005];
void update(int node, int st, int en, int l, int r, int val) {
  if (lazy[node] != 0) {
    tree[node] += (en - st + 1) * lazy[node];
    if (st != en) {
      lazy[node * 2] += lazy[node];
      lazy[node * 2 + 1] += lazy[node];
    }
    lazy[node] = 0;
  }
  if (st > en or st > r or en < l) return;
  if (st >= l and en <= r) {
    tree[node] += (en - st + 1) * val;
    if (st != en) {
      lazy[node * 2] += val;
      lazy[node * 2 + 1] += val;
    }
    return;
  }
  int mid = (st + en) / 2;
  update(node * 2, st, mid, l, r, val);
  update(node * 2 + 1, mid + 1, en, l, r, val);
  tree[node] = tree[node * 2] + tree[node * 2 + 1];
}
int query(int node, int st, int en, int l, int r) {
  if (st > en or st > r or en < l) return 0;
  if (lazy[node] != 0) {
    tree[node] += (en - st + 1) * lazy[node];
    if (st != en) {
      lazy[node * 2] += lazy[node];
      lazy[node * 2 + 1] += lazy[node];
    }
    lazy[node] = 0;
  }
  if (st >= l and en <= r) return tree[node];
  int mid = (st + en) / 2;
  int p1 = query(node * 2, st, mid, l, r);
  int p2 = query(node * 2 + 1, mid + 1, en, l, r);
  return (p1 + p2);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  memset(tree, 0, sizeof(tree));
  memset(lazy, 0, sizeof(lazy));
  long long int c, p, lo, hi, mid;
  memset(ans, 0, sizeof(ans));
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> v[i];
  }
  st[0] = 0;
  for (int i = 1; i <= n; i++) {
    cin >> t[i];
    st[i] = st[i - 1] + t[i];
  }
  for (int i = 1; i <= n; i++) {
    p = v[i] + st[i - 1];
    lo = 0;
    hi = n;
    while (lo <= hi) {
      mid = (lo + hi) / 2;
      if (p >= st[mid]) {
        if (p >= st[mid + 1]) {
          lo = mid + 1;
        } else {
          break;
        }
      } else {
        hi = mid - 1;
      }
    }
    update(1, 1, n, i, mid, 1);
    p = st[mid] - st[i - 1];
    if (mid + 1 <= n && v[i] > p) {
      ans[mid + 1] += v[i] - p;
    }
  }
  for (int i = 1; i <= n; i++) {
    c = query(1, 1, n, i, i);
    ans[i] += c * t[i];
    cout << ans[i] << " ";
  }
  return 0;
}
