#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
using namespace std;
template <class T>
inline T bigmod(T p, T e, T M) {
  long long ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p) % M;
    p = (p * p) % M;
  }
  return (T)ret;
}
template <class T>
inline T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
inline T modinverse(T a, T M) {
  return bigmod(a, M - 2, M);
}
template <class T>
inline T lcm(T a, T b) {
  a = abs(a);
  b = abs(b);
  return (a / gcd(a, b)) * b;
}
template <class T, class X>
inline bool getbit(T a, X i) {
  T t = 1;
  return ((a & (t << i)) > 0);
}
template <class T, class X>
inline T setbit(T a, X i) {
  T t = 1;
  return (a | (t << i));
}
template <class T, class X>
inline T resetbit(T a, X i) {
  T t = 1;
  return (a & (~(t << i)));
}
inline long long getnum() {
  char c = getchar();
  long long num, sign = 1;
  for (; c < '0' || c > '9'; c = getchar())
    if (c == '-') sign = -1;
  for (num = 0; c >= '0' && c <= '9';) {
    c -= '0';
    num = num * 10 + c;
    c = getchar();
  }
  return num * sign;
}
inline long long power(long long a, long long b) {
  long long multiply = 1;
  for (int i = (0); i < (b); i++) {
    multiply *= a;
  }
  return multiply;
}
int n, v[100005], t[100005];
long long sum[100005], aux[100005], extra[100005], ans[100005];
int find(long long val, int start) {
  int l = start, r = n;
  while (l <= r) {
    int mid = (l + r) / 2;
    long long now = sum[mid] - sum[start - 1];
    if (now < val)
      l = mid + 1;
    else if (now > val)
      r = mid - 1;
    else
      return mid;
  }
  return l;
}
int main() {
  int test, cases = 1;
  scanf("%d", &n);
  for (int i = (1); i < (n + 1); i++) scanf("%d", &v[i]);
  for (int i = (1); i < (n + 1); i++) scanf("%d", &t[i]);
  for (int i = (1); i < (n + 1); i++) sum[i] = sum[i - 1] + t[i];
  for (int i = (1); i < (n + 1); i++) {
    int pos = find(v[i], i);
    if (pos == i) {
      extra[i] += min(v[i], t[i]);
    } else {
      aux[i]++;
      aux[pos]--;
      long long rest = v[i] - (sum[pos - 1] - sum[i - 1]);
      extra[pos] += rest;
    }
  }
  for (int i = (1); i < (n + 1); i++) aux[i] += aux[i - 1];
  for (int i = (1); i < (n + 1); i++) ans[i] = aux[i] * t[i] + extra[i];
  for (int i = (1); i < (n + 1); i++) printf("%I64d ", ans[i]);
  puts("");
  return 0;
}
