#include <bits/stdc++.h>
using namespace std;
int n;
long long r;
vector<long long> l;
vector<long long> t;
int main() {
  cin >> n >> r;
  l.resize(n);
  t.resize(n);
  for (int i = 0; i < n; i++) {
    cin >> l[i];
  }
  for (int i = 0; i < n; i++) {
    cin >> t[i];
  }
  bool nope = false;
  long long p0 = 0, brdr = 0, duz = 0;
  vector<long long> brsr;
  for (int i = 0; i < n; i++) {
    long long li = l[i], ti = t[i];
    if (li > ti) {
      nope = true;
      break;
    }
    if (2 * li - min(p0, ti) <= ti) {
      p0 = max(p0 - li, 0LL);
      duz += li;
      continue;
    }
    long long d = 2 * li - p0 - ti;
    if (d <= 0) {
      p0 = -d;
    } else {
      if (brsr.size() > 100000) {
        brdr += (d - 1) / r + 1;
      } else {
        for (int i = 0; i < (d - 1) / r + 1; i++) {
          if (brsr.size() <= 100000)
            brsr.push_back(2 * (i * r + duz + li - d) - (brdr)*r);
          brdr++;
        }
      }
      p0 = r * ((d - 1) / r + 1) - d;
    }
    duz += li;
  }
  if (nope) {
    cout << -1 << endl;
    return 0;
  }
  cout << brdr << endl;
  if (brdr <= 100000) {
    for (const auto& x : brsr) {
      cout << x << " ";
    }
  }
  return 0;
}
