#include <bits/stdc++.h>
using namespace std;
int n;
long long cnt, l[200005], t[200005], kq[200005], r;
void Enter() {
  cin >> n >> r;
  for (int i = 1; i <= n; i++) cin >> l[i];
  for (int i = 1; i <= n; i++) cin >> t[i];
}
long long Search(long long s1, long long s2, long long t) {
  long long l = s1, h = s2;
  while (l <= h) {
    long long m = (l + h) / 2;
    if ((m - s1) * 2 + s2 - m <= t)
      l = m + 1;
    else
      h = m - 1;
  }
  return h;
}
void Solve() {
  for (int i = 1; i <= n; i++) {
    if (l[i] > t[i]) {
      cout << -1;
      return;
    }
  }
  long long j = 0, s = 0, t1 = 0;
  for (int i = 1; i <= n; i++) {
    if (j >= s + l[i]) {
      s += l[i];
      continue;
    }
    long long r1 = Search(j, s + l[i], t[i] - j + s);
    long long cmt = cnt;
    cnt += (s + l[i] - r1) / r;
    if ((s + l[i] - r1) % r != 0) cnt++;
    if (cnt <= 1e5) {
      long long tt = t1 + (r1 - j) * 2;
      for (int i = cmt + 1; i <= cnt; i++) kq[i] = tt + (i - cmt - 1) * r;
    }
    long long jj = j;
    j = r1 + r * (cnt - cmt);
    t1 += (r1 - jj) * 2 + j - r1;
    s += l[i];
  }
  cout << cnt << '\n';
  if (cnt <= 1e5) {
    for (int i = 1; i <= cnt; i++) cout << kq[i] << " ";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  Enter();
  Solve();
}
