#include <bits/stdc++.h>
using namespace std;
int n;
long long r;
long long l[200005];
long long t[200005];
vector<long long> res;
void solve() {
  res.clear();
  cin >> n >> r;
  for (int i = 0; i < (n); ++i) {
    scanf("%I64d", l + i);
  }
  for (int i = 0; i < (n); ++i) scanf("%I64d", t + i);
  long long lft = 0, cnt = 0;
  for (int i = 0; i < (n); ++i) {
    if (t[i] < l[i]) {
      printf("-1");
      return;
    }
  }
  long long nw = 0;
  for (int i = 0; i < (n); ++i) {
    if (lft >= l[i]) {
      lft -= l[i];
      nw += l[i];
      continue;
    }
    l[i] -= lft;
    t[i] -= lft;
    nw += lft;
    lft = 0;
    long long need = l[i] * 2 - t[i];
    if (need > 0) {
      long long tm = need / r + ((need % r) > 0);
      cnt += tm;
      lft += r * tm - need;
      long long st = nw + t[i] - need;
      if (cnt <= 100000) {
        for (int j = 0; j < (tm); ++j) {
          res.push_back(st + j * r);
        }
      }
    }
    nw += min(t[i], l[i] * 2);
  }
  cout << cnt << endl;
  if (cnt <= 100000) {
    for (long long k : res) {
      printf("%I64d ", k);
    }
    putchar('\n');
  }
}
int main(int argc, char **argv) {
  solve();
  return 0;
}
