#include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops")
using namespace std;
const int inf = (1953125 << 9);
const int maxn = 1 * 1e5 + 5;
int n;
long long v[100010], t[100010], res[100010], s[100010], dem[100010],
    inc[100010];
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> v[i];
  for (int i = 1; i <= n; i++) cin >> t[i];
  s[1] = t[1];
  for (int i = 2; i <= n; i++) s[i] = s[i - 1] + t[i];
  memset(dem, 0, sizeof(dem));
  for (int i = 1; i <= n; i++) {
    int lo = i, hi = n, mid, now = i - 1;
    while (lo <= hi) {
      mid = (lo + hi) / 2;
      if (s[mid] - s[i - 1] <= v[i]) {
        now = mid;
        lo = mid + 1;
      } else
        hi = mid - 1;
    }
    if (now >= i) {
      dem[i] += 1;
      dem[now + 1] -= 1;
    }
    inc[now + 1] = inc[now + 1] + v[i] - (s[now] - s[i - 1]);
  }
  for (int i = 1; i <= n; i++) {
    dem[i] = dem[i] + dem[i - 1];
    cout << dem[i] * t[i] + inc[i] << " ";
  }
}
