#include <bits/stdc++.h>
using namespace std;
int n, v[100010], t[100010], l, r, mid;
long long ans[100010], sum[100010], c[100010], s[100010];
bool check(int x, int p) { return sum[x] - sum[p - 1] <= v[p]; }
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &v[i]);
  }
  for (int i = 1; i <= n; i++) {
    scanf("%d", &t[i]);
    sum[i] = sum[i - 1] + t[i];
  }
  for (int i = 1; i <= n; i++) {
    l = i - 1;
    r = n;
    while (l < r) {
      mid = (l + r + 1) / 2;
      if (check(mid, i)) {
        l = mid;
      } else {
        r = mid - 1;
      }
    }
    c[i]++;
    c[l + 1]--;
    s[l + 1] += v[i] - (sum[l] - sum[i - 1]);
  }
  for (int i = 1; i <= n; i++) {
    ans[i] = ans[i - 1] + c[i];
    printf("%I64d ", ans[i] * t[i] + s[i]);
  }
  return 0;
}
