#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 5;
vector<long long> s;
long long t[N];
long long a[N];
long long n, r, ans;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> r;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (long long i = 1; i <= n; i++) {
    cin >> t[i];
  }
  long long cur_energy = 0;
  long long cur_time = 0;
  for (long long i = 1; i <= n; i++) {
    long long d = min(cur_energy, a[i]);
    cur_energy -= d;
    a[i] -= d;
    t[i] -= d;
    cur_time += d;
    if (a[i] > t[i]) return cout << -1, 0;
    t[i] = min(t[i], 2 * a[i]);
    d = t[i] - a[i];
    a[i] -= d;
    t[i] -= 2 * d;
    cur_time += 2 * d;
    ans += (a[i] / r) + (a[i] % r != 0);
    if (a[i] % r) cur_energy = r - a[i] % r;
    while ((long long)s.size() <= (long long)1e5 && a[i] > 0) {
      s.push_back(cur_time);
      cur_time += r;
      a[i] -= r;
    }
    cur_time += a[i];
  }
  cout << ans << "\n";
  if ((long long)s.size() <= (long long)1e5) {
    for (long long x : s) cout << x << " ";
  }
  return 0;
}
