#include <bits/stdc++.h>
using namespace std;
template <class T>
T gcd(T a, T b) {
  return (b != 0 ? gcd<T>(b, a % b) : a);
}
template <class T>
T lcm(T a, T b) {
  return (a / gcd<T>(a, b) * b);
}
template <class T>
inline bool read(T &x) {
  int c = getchar();
  int sgn = 1;
  while (~c && c < '0' || c > '9') {
    if (c == '-') sgn = -1;
    c = getchar();
  }
  for (x = 0; ~c && '0' <= c && c <= '9'; c = getchar()) x = x * 10 + c - '0';
  x *= sgn;
  return ~c;
}
const int INF = 2000000009;
const int MX = 100005;
const double EPS = 1e-9;
const int MOD = 1000000007;
long long a[MX], t[MX], cnt[MX];
long long sum[MX], lazy[MX];
int main() {
  long long n = ({
    long long a;
    read(a);
    a;
  });
  long long a[n];
  for (int i = 1; i <= n; i++)
    a[i] = ({
      long long a;
      read(a);
      a;
    });
  long long t[n];
  for (int i = 1; i <= n; i++)
    t[i] = ({
      long long a;
      read(a);
      a;
    });
  for (int i = 1; i <= n; i++) sum[i] = t[i] + sum[i - 1];
  for (int i = 1; i <= n; i++) {
    if (a[i] <= t[i]) {
      lazy[i] += a[i];
      continue;
    }
    long long k = sum[i - 1] + a[i];
    int ind = upper_bound(sum + 1, sum + 1 + n, k) - sum;
    cnt[i]++;
    cnt[ind]--;
    lazy[ind] += k - sum[ind - 1];
  }
  for (int i = 1; i <= n; i++) {
    cnt[i] += cnt[i - 1];
    printf("%lld ", cnt[i] * t[i] + lazy[i]);
  }
  printf("\n");
  return 0;
}
