#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const int INF = 0x3f3f3f3f;
const long long LL_INF = 0x3f3f3f3f3f3f3f3f;
const double PI = acos(-1);
const double EPS = 1e-10;
const int N = 100010;
int n;
long long v[N];
long long t[N];
int a[N], b[N];
long long dp[N];
long long res[N];
int lowerBound(long long key, int pos) {
  int res = -1, low = pos, high = n;
  while (low <= high) {
    int mid = (low + high) / 2;
    if (dp[mid] - dp[pos - 1] >= key) {
      res = mid;
      high = mid - 1;
    } else {
      low = mid + 1;
    }
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> v[i];
  }
  for (int i = 1; i <= n; ++i) {
    cin >> t[i];
  }
  for (int i = 1; i <= n; ++i) {
    dp[i] = dp[i - 1] + t[i];
  }
  for (int i = 1; i <= n; ++i) {
    int pos = lowerBound(v[i], i);
    if (pos == -1) {
      ++b[i];
      --b[n + 1];
      continue;
    }
    ++b[i];
    --b[pos];
    long long melt = dp[pos - 1] - dp[i - 1];
    long long remain = v[i] - melt;
    res[pos] += remain;
  }
  for (int i = 1; i <= n; ++i) {
    a[i] = b[i] + a[i - 1];
  }
  for (int i = 1; i <= n; ++i) {
    res[i] += t[i] * a[i];
    cout << res[i] << ' ';
  }
}
